This stronger statement is true:
Let $f(x) \in \mathbb{Z}[x]$, and suppose $\sqrt[d]{f(n)} \in \mathbb{Z}$ for all but finitely many positive integers $n$. Then $f(x) = (g(x))^d$ for some $g(x) \in \mathbb{Z}[x]$.
Proof:
We first consider the case where $f(x)$ is irreducible.
Facts:
Let $p$ be one of the infinitely many primes dividing some value of $f$, but not dividing the discriminant of $f(x)$. Let $n$ be one of the values such that $p \mid f(n)$. We can assume $n$ is large enough that $f(n)$ is a $d$th power.
Write
$$f(x) = a_0 + a_1(x-n) + a_2(x-n)^2+\ldots$$
We'll assume $d \ge 2$. Note that
- $p^2 \mid a_0$ since $f(n)$ is a perfect $d$th power with $d\ge 2$.
- $p \not \mid a_1$; otherwise, $(x-n)^2$ would divide $f(x)$ mod $p$, contradicting the fact that $f(x)$ is squarefree mod $p$.
If $m$ is any integer satisfying
$$p \mid (m-n) \qquad \text{and} \qquad p^2 \not \mid (m-n)$$
then the above expansion shows that
$$p \mid f(m) \qquad \text{and} \qquad p^2 \not \mid f(m).$$
Thus $f(m)$ is not a perfect $d$th power.
Now we move to the general case, where $f(x)$ is not necessarily irreducible.
Let $h(x)$ be any irreducible factor of $f(x)$. As before, take $p$ to be one of the infinitely many primes dividing $h(n)$ for some integer $n$. But this time, we place the restriction that $p$ does not divide the discriminant of the squarefree part of $f(x)$. We will use one more fact:
- Let $f(x)$ have irreducible factors $h_i(x)$, and let $p$ be any prime not dividing the discriminant of the squarefree part of $f(x)$. Then for each integer $n$,$\,$ $p$ divides at most one of the $h_i(n)$.
Now, a similar argument to the above shows that $h(x)$ has infinitely many values $h(m)$ such that $p \mid h(m)$ but $p^2 \not \mid h(m)$. By the fact above, none of the other irreducible factors of $f(x)$ contribute to the exponent of $p$ in $f(m)$. So in order for $f(m)$ to be a $d$th power, the exponent of $h(x)$ in the factorization of $f(x)$ must be divisible by $d$.
This argument shows each non-constant irreducible factor of $f(x)$ is a $d$th power. Finally, the constant factor must be a $d$th power as well, otherwise none of the values of $f$ would be a $d$th power. So $f(x)$ is a $d$th power in $\mathbb{Z}[x]$.
$$\tag*{$\square$}$$