There do not necessarily exist polynomials $h_1,\ldots,h_m$ which only involve monomials of even degree such that $f = h_1^2 + \cdots + h_m^2$, even in the case when $f$ is a univariate polynomial.

A polynomial $h$ that only involves monomials of even degree is an even polynomial: it satisfies $h(x) = h(-x)$ for all $x$. A sum of squares of even polynomials must also be an even polynomial. However, the square of a polynomial need not be even: for example, if $g(x) = x+1$ then $f = g^2$ is not an even polynomial, and hence it can't be expressed as $f = h_1^2 + \cdots + h_m^2$ for even polynomials $h_1,\ldots,h_m$.