Presumably $X$ takes values on $\mathbb{Z}$. Then, $X^2$ takes values on $\{n^2:n\in\mathbb{Z}\}\subset\mathbb{Z}_+=\{0\}\cup\mathbb{N}$.
$\sigma(X^2)$ is generated by the sets $A_n=\{\omega: X(\omega)\in\{-n,n\}\}$, $n\in\mathbb{Z}_+$. Hence
$$E[h(X)|X^2](\omega)=\sum_{n\geq0}\alpha_n\mathbb{1}_{A_n}(\omega)=\sum_{n\geq0}\alpha_n\mathbb{1}_{\{n^2\}}(X^2(\omega))=:H(X^2(\omega))$$
where $H(t)=\sum_{n\geq0}\alpha_n\mathbb{1}_{\{n^2\}}(t)$, and $\alpha_n\in\mathbb{R}$ are constant to be determined.
For each $n\in\mathbb{Z}_+$,
$$E[h(X)\mathbb{1}_{\{n^2\}}(X^2)]=P[X=-n]h(-n)+P[X=n]h(n)$$
On the other hand,
$$E\Big[H(X^2)\mathbb{1}_{\{n^2\}}(X^2)\Big]=\alpha_n\big(P[X=-n]+P[X=n]\big)$$
whence we obtain that
$$\alpha_n=\frac{P[X=-n]h(-n)+P[X=n]h(n)}{P[X=-n]+P[X=n]}$$
with the understanding that $\alpha_n=0$ if $P[X\in\{-n,n\}]=0$.
Putting things together
$$E[h(X)|X^2]=\sum_{n\geq0}\frac{P[X=-n]h(-n)+P[X=n]h(n)}{P[X=-n]+P[X=n]}\mathbb{1}_{\{n^2\}}(X^2)$$