Let's begin by classifying formal power series $f$ in $\mathbb{C}[[Z]]$ such that $f(Z^2) = f(Z)^2.$
Note that any power of the identity or 0 satisfies the above equation i.e. every element of $\{f:\mathbb{C} \rightarrow \mathbb{C} : f(Z) = Z^n \text{ for some } n\in\mathbb{N}\}\cup\{0\}$ satisfies $f(Z^2) = f(Z)^2$. We demonstrate that that is the complete set of solutions
Let $f\in \mathbb{C}[[Z]]$ and write
$$f(Z) = a_nZ^n + a_kZ^k + ... $$
where $k>n$ and $a_n \neq 0.$
Then
$$f(Z)^2 = a_n^2 Z^{2n} + 2a_n a_k Z^{n+k} \mod Z^{n+k+1}$$
and
$$f(Z^2) = a_n Z^{2n} \mod Z^{n+k+1}.$$
If $f(Z^2) = f(Z)^2$, it follows $a_k = 0$ and $a_n = a_n^2.$ Thus, as $a_n \neq 0,$ we obtain $a_n = 1.$
Hence, $f(Z) = Z^n$ for some $n.$
As the ring of entire functions embeds into the ring of formal power series over $\mathbb{C},$ we conclude the only entire functions commuting with $Z^2$ are powers of the identity or 0.