A harmonic polynomial lies in a finite subspace stable under both compact Lie algebras
Let $p,q,r,s\ge0$, put $I=\{1,\ldots,p\}\sqcup\{1,\ldots,q\}$ and $J=\{1,\ldots,r\}\sqcup\{1,\ldots,s\}$, and consider $\mathcal P=\mathbb C[x_{ab}:a\in I,b\in J]$ with the two oscillator actions $A_1,A_2$ defined below. Let $h\in\mathcal P$ satisfy $$\bigl(A_1(Z)\bigr)_{-2}h=0$$ for every matrix $Z$ on $I$ whose two diagonal blocks vanish. Then there is a finite-dimensional subspace $H_0\subseteq\mathcal P$ containing $h$, consisting entirely of polynomials satisfying the same condition, invariant under $A_1(Z)$ for all block diagonal matrices $Z$ on $I$ and under $A_2(Y)$ for all block diagonal matrices $Y$ on $J$.
For $l=(a,b)\in I\times J$, set $L_l=\partial_l$, $R_l=x_l$ if the two indices belong to corresponding blocks; otherwise set $L_l=x_l$, $R_l=-\partial_l$. Put $$\Omega(B)=\sum_{l,l'}B_{ll'}(R_lL_{l'}+\tfrac12\delta_{ll'}),\qquad A_1(Z)=\Omega(Z\otimes I_J),\quad A_2(Y)=\Omega(I_I\otimes Y).$$ For an operator $A$, its component lowering total degree by two is $A_{-2}P=\sum_{d\ge0}(A(P_{d+2}))_d$, where $P_e$ is the homogeneous component of degree $e$.