My question is concerned with the difference between two ways of defining the moment of inertia, and how to interpret the difference. Let me begin by saying I understand moments of inertia are relative to a particular axis of rotation, but the $r$ that shows up in defining lower moments (center of mass) does not seem to be a position vector relative to some axis, but relative to the origin. I begin by taking moments of a mass distribution $\rho(r)$. The 0th moment gives total charge:
$Q=\int d^3r \rho(r)$
The 1st moment (normalized to the 0th moment) gives the average location of the mass, or the Center of Mass:
$\vec{R}=\frac{\int d^3r \vec{r}\rho(r)}{\int d^3r\rho(r)}$
Note: $\vec{r}$ here is the location of some differential chunk of mass $dm$ relative to the origin. I am not identifying it with a distance from any particular axis of rotation. I now include another factor of $r$ to give the 2nd moment, which should be related to the moment(s) of inertia:
$\tilde{I}=\int d^3r r^2\rho(r)=\int d^3r (x^2+y^2+z^2)\rho(r)$
Again, $r^2$ is not a distance from an axis of rotation, it's just the square of the position vector of the mass relative to the origin that showed up in the 1st moment. Off the bat, blindly taking moments of this mass distribution is not giving us a moment of inertia with respect to some axis, and I don't know how to interpret it. I try to gain some intuition by comparing this weird 2nd moment of mass with components of the actual inertia tensor:
$I^{ij}=\int d^3r\rho(r)(r^2\delta^{ij}-x^ix^j)$
where $x^i$ is some cartesian coordinate. The moment of inertia for rotation about the x-axis is then
$I^{xx}=\int d^3r\rho(r)(y^2+z^2)$
Similarly
$I^{yy}=\int d^3r\rho(r)(x^2+z^2)$
and
$I^{zz}=\int d^3r\rho(r)(x^2+y^2)$
The trace then gives
$I^i_{~i}=2\int d^3r \rho(r)(x^2+y^2+z^2)=2\tilde{I}$
So whatever the 2nd moment I defined earlier is, it seems to be related to the trace of the principle moments of inertia (assuming I chose a smart basis). Is $\tilde{I}$ just something of an average moment with the wrong normalization? Of course I could just take moments with new position vector $\vec{r}=(\sqrt{y^2+z^2},\sqrt{x^2+z^2},\sqrt{x^2+y^2})$ but I don't know how to motivate that change of variables considering I'd simultaneously be modifying the definition of the center of mass.