It is simply not true that if you impose $k$ polynomial constraints on $n$ variables then the result has dimension $n-k$, even if the constraints "look independent," and this is itself an example. When this happens the resulting <a href="https://en.wikipedia.org/wiki/Affine_variety">affine variety</a> is said to be a <a href="https://en.wikipedia.org/wiki/Complete_intersection">complete intersection</a>, and as far as I know this is a pretty rare condition.

Here's a similar but simpler example where we can see what's going on more explicitly. Consider the set of $n \times m$ matrices of rank at most $1$. It's not hard to show that this is an affine variety cut out by the equations

$$x_{ij} x_{k \ell} - x_{i \ell} x_{k j} = 0$$ 

given by the vanishing of all $2 \times 2$ <a href="https://en.wikipedia.org/wiki/Minor_(linear_algebra)">minors</a>. This imposes ${n \choose 2} {m \choose 2}$ polynomial constraints on $nm$ variables, and of course the former is larger than the latter as soon as $n, m \ge 4$, yet nonzero matrices of rank at most $1$ obviously exist, and in fact this variety clearly has dimension $n + m - 1$ (a nonzero matrix of rank $1$ is an outer product of two nonzero vectors, but we have the freedom to scale either vector). 

This is similar to the Lie algebra example in that we are imposing a system of homogeneous quadratic equations, but differs in that it is much easier in this case to compute the actual dimension of the variety. I have no idea how to compute the dimension in the Lie algebra case.

In this case it's not hard to see explicitly that many of the constraints are redundant most of the time: for example, if $x_{11} \neq 0$ we actually only need to impose the constraint that minors of the form $x_{11} x_{k \ell} - x_{1 \ell} x_{k 1}$ vanish, and there are $(n - 1)(m - 1)$ of these, which gives a naive dimension count of

$$nm - (n - 1)(m - 1) = n + m - 1$$ 

which is actually correct. On the other hand, if, say, the entire first row vanishes then these constraints are trivially satisfied, so in that case we need the others. So, loosely speaking, this variety is covered by many "patches" on which a much smaller set of equations suffices to cut it out, but no single such set works on every patch, and we need the entire much larger set to cut out the whole thing. 

As another perspective on how "independent" the constraints really are, we can rephrase the above argument more algebraically: starting from the constraints $x_{11} x_{k \ell} - x_{1 \ell} x_{k 1} = 0$ we can write

$$x_{11} x_{k \ell} = x_{1 \ell} x_{k 1}$$
$$x_{11} x_{i j} = x_{1 j} x_{i 1}$$
$$x_{11} x_{kj} = x_{1 j} x_{k 1}$$
$$x_{11} x_{i \ell} = x_{1 \ell} x_{i 1}$$

from which we deduce that

$$x_{11}^2 x_{k \ell} x_{ij} = x_{1 \ell} x_{k1} x_{1 j} x_{i 1} = x_{11}^2 x_{kj} x_{i \ell}$$

so we see very explicitly that if $x_{11} \neq 0$ then we could deduce all ${n \choose 2} {m \choose 2}$ constraints from just the $(n - 1)(m - 1)$ constraints involving $x_{11}$ above. But since $x_{11}$ could be zero we can get almost but not all the way to deducing the rest of the constraints from these ones.