Let $$I_k:= c \int_{\mathbb R^3} (3x_k'^2-r'^2) \,\,\,d^3 x'$$ where ${r'}^2={x'}_1^2+{x'}_2^2+{x'}_3^2$ and $c$ is a constant = density of charge (uniform) in the body.
Suppose this integral is evaluated for a solid spheroid $${x^2\over a^2}+{y^2\over a^2}+{z^2\over b^2}\le 1$$
Now suppose we hollow out the spheroid and place all the charge uniformly over the shell. Is there a good way of seeing whether $I_k$ remains constant or changes?
I'd reformulate the question as follows:
Consider a constant charge density $c$ on the rotationally symmetric ellipsoid $$B:\quad {x^2+y^2\over a^2}+ {z^2\over b^2}\leq 1\ .$$ We are interested in the two integrals (edited after seeing Joriki's answer) $$J:=c\int\nolimits_B \bigl(3x^2-(x^2+y^2+z^2)\bigr)\ {\rm d}(x,y,z)=c\int\nolimits_B (x^2-z^2)\ {\rm d}(x,y,z)$$ and $$J':=c\int\nolimits_B \bigl(3z^2-(x^2+y^2+z^2)\bigr)\ {\rm d}(x,y,z)=-2 J\ .$$ How do their values change when the same total charge is uniformly (with respect to surface measure ${\rm d}\omega$) distributed over the surface $\partial B$?
The answer is not at all obvious and may depend in a "nonelementary" way on the ratio $a/b$.