Suppose $r$ is a root of the polynomial. Then $p(r^2) = p(r) p(r+1) = 0$ and $p((r-1)^2) = p(r-1) p(r) = 0$, so $r^2$ and $(r-1)^2$ are
roots as well.
In order to avoid generating an infinite sequence of
distinct roots, each the square of the previous one, we need $|r| = 0$ or $|r| = 1$. Similarly we need $|r-1| = 0$ or $1$, and
$|r^2-1| = 0$ or $1$. It's not hard to show that the only possible roots are $0$ and $1$.
EDIT: So let $p(x) = a x^m (x-1)^n$.
By considering the leading coefficient of $p(x^2) - p(x)p(x+1)$, we find that $a = 1$. The zero of $p(x^2)$ at $0$ has order $2m$, while the zero of $p(x) p(x+1)$ there
has order $m+n$, so $m = n$.
And finally, we find that $p(x) = x^m (x-1)^m$ does satisfy the equation.
The polynomials with $f(x)\mid f(x^2)$ are closed under multiplication. In fact, if $f$ is any such polynomial and $g(x)\mid f(x^2)/f(x)$, then $f(x)g(x)$ is also such a polynomial.
WLOG assume $x\nmid f(x)$. The relation $f(x)\mid f(x^2)$ implies
$$ \{\alpha:f(\alpha)=0\}\subseteq \{\beta:f(\beta^2)=0\}=\{\pm\sqrt{\beta}:f(\beta)=0\}.$$
Let $\alpha$ be a zero. Then $\alpha=\pm\sqrt{\beta}$ for some other zero $\beta$, or equivalently $\alpha^2=\beta$. Put another way, the square of any zero is also a zero, so the set of zeros is closed under squaring. Therefore we have a sequence of zeros $\alpha,\alpha^2,\alpha^4,\cdots$ which must eventually terminate since $f$ has finitely many zeros, in which case $\alpha^{2^n}=\alpha^{2^m}$ eventually, so $\alpha^{2^r(2^s-1)}=1$ and thus $\alpha$ is a root of unity.
We can restrict our attention to $f$ that cannot be written as a nontrivial product of other polynomials with this property. I don't think there's a very nice characterization of the possible set of zeros of $f$ beyond "start with a root of unity and keep squaring until you get a repeat." For example, over $\mathbb{C}$ we have that $f(x)=(x-i)(x+1)(x-1)$ is such a polynomial; it includes a kind of "cycle" of length two $\{-1,1\}$ in its zero set, but it also has a kind of "hangnail" at the front, namely $i$. If we think about this in terms of integers mod $n$, we can write $n=2^km$ and use the Chinese Remainder Theorem to track what $x\mapsto 2x$ does to an integer mod $n$; the sequence is eventually periodic but at the beginning the $\mathbb{Z}/2^k\mathbb{Z}$ coordinate may be nonzero.
To get the $f$ with real coefficients, just make sure the set $\{\alpha,\alpha^2,\alpha^4\cdots\}$ is closed under conjugation; if it isn't, then adjoin all their conjugates to construct an $f$ with real coefficients.
And to get $f$ with integer coefficients, if $f$ has an $n$th root of unity as a zero then $f$ is divisible by the cyclotomic polynomial $\Phi_n(x)$. If $n$ is even, then squaring primitive $2n$th roots of unity yield primitive $n$th roots of unity, meaning both $\Phi_{n}(x)$ and $\Phi_{n/2}(x)$ are factors. Writing $n=2^km$, this means it is divisible by $\Phi_{2^km}(x)\Phi_{2^{k-1}m}(x)\cdots\Phi_m(x)$. One can check these polynomials satisfy the condition.
Best Answer
Note that I interpret $f^n(z)$ as $\big(f(z)\big)^n$. However, I can show why this problem is not using $f^n$ to mean $f\circ f\circ \ldots \circ f=f^{[n]}$ (with $n$ occurrences of $f$). I will now find all polynomials $f$ such that $$f(z^n)=f^{[n]}(z).$$Note that constant polynomials always work.
We now ignore constant $f$. If $d>0$ is the degree of $f$, then $f^{[n]}(z)$ has degree $d^n$ while $f(z^n)$ has degree $dn$. Therefore, $$d^n=dn.$$ That is, $d^{n-1}=n$. For $n>2$, this is impossible. If $n=2$ and $d=2$, then we are to solve for $f$ such that $$f(z^2)=f\big(f(z)\big).$$ If $a$ is the leading coefficient of $f(z)$, then $a=a^2$ and so $a=1$. That is $f(z)=z^2+bz+c$. Hence, $$0=f\big(f(z)\big)-f(z^2)=2bz^3+(b^2+2c)z^2+b(b+2c)z+c(b+c).$$ Therefore, $b=c=0$. Thus $f(z)=z^2$ is the only non-constant answer (which may make the problem a bit uninteresting).
For the remaining part, $f^n(z)$ is $\big(f(z)\big)^n$. If $f$ is constant, then show that $f(z)=0$ or $f(z)=\gamma$ where $\gamma$ satisfies $\gamma^{n-1}=1$. Suppose now that $f$ has degree $d\geq 1$.
Let $r$ be an arbitrary root of $f$. Then, for any $n$th root $r_1$ of $r$, $$0=f(r)=f(r_1^n)=f^n(r_1).$$ So $f(r_1)=0$, or $r_1$ is a root of $f$. By induction, if $r_k$ is an $n^k$th root of $r$, then $r_k$ is also a root of $f$. But if $r\neq 0$, there are $n^k$ distinct choices of $r_k$. Thus, the degree of $f$ is at least $n^k$ for every positive integer $k$. This is absurd. Therefore, the only root of $f$ is $0$. You can finish the rest, and you will find out that $$f(z)=\gamma z^d$$ where $\gamma^{n-1}=1$. (Since the problem offers richer solutions with the interpretation $f^n(z)=\big(f(z)\big)^n$, I think this is what it is supposed to mean.)