In fact, there are many solutions in $(A,B)\in \mathbb{C}^{2n^2}$. Let $f:(A,B)\rightarrow AB-BA\in \{U;tr(U)=0\}\approx \mathbb{C}^{n^2-1}$. It can be shown that, for a generic $(A,B)$, $f$ is a submersion in a neighborhood of $(A,B)$ (that is $Df_{A,B}$ is surjective). Then, for a generic $C\in \mathbb{C}^{n^2}$, $f^{-1}(C)$ is an algebraic set of dimension $2n^2-(n^2-1)=n^2+1$ (degrees of freedom).
Beware 1. it is not true for particular $C$; for example, $f^{-1}(0_n)$ has dimension $n^2+n$.
Beware 2. Although $dim(f^{-1}(C))>n^2$, we cannot randomly choose $A$ (for example).
EDIT. Since $rank(Df_{A,B})\leq n^2-1$, the minimum of $dim(f^{-1}(C))$ is $n^2+1$ (generic case). Now, about the maximum, I think that it is $n^2+n$ but I am not sure...