Working in dimension two, I'm trying to find $u:\mathbb{R}^2\to \mathbb{R}^2$ and $a,b,c$ such that:
$$D(f)=a\frac{\partial^2 f}{\partial x^2}+b\frac{\partial^2 f}{\partial x\partial y}+c\frac{\partial^2 f}{\partial y^2}=0\implies D(f\circ u)=0$$
Moreover, we must have $b^2-ac\neq 0$, which is a condition on the symmetric matrix $(a,b,b,c)$; it also weeds out any trivial answers.
My attempts so far are using well-known formulas such as $(a,b,c)=(1,0,1)$ or $(a,b,c)=(1,0,-1)$, and rewriting the equation with an $f$ that would be a solution. However, I always end up finding either $u$ affine or $u=0$.
I also believe this not to be true for all $(a,b,c)$: the right combination has to be found in order to be able to find $u$ not affine.
I have chosen $(a,b,c)=(1,0,-1)$. We notice that $u(x,y)=(xy,\frac{1}{2}(x^2+y^2)$ does indeed conserve the kernel of $D$ by developing the whole formula of $D(f\circ u)$. $u$ is indeed non-affine.
Moreover, a detailed expression of the kernel of $D$ can be obtained by deducing necessary conditions on $u$ from the expression obtained. For instance, the expression of $u$ over each component must be in the kernel (here, $(x,y)\mapsto xy$ is in the kernel and $(x,y)\mapsto\frac{1}{2}(x^2+y^2)$ too) (this is true for all $D$).
Here, this means that $u(x,y) = (u_1(x+y)+u_2(x-y), u_3(x+y)+u_4(x-y))$.
The other two conditions that can be deduced are partial differential equations on $u_1,u_2,u_3,u_4$ which can help obtain examples such the one that I did (luck is also a factor, however).