Prime Exponent Polynomials
If $f$ is constant, the property is easy, so suppose that the degree of $f$ is $d\geq 1$. Let $g\in \mathbb{Q}[x]$. There exists $q,r$, polynomials such that the degree of $r$ is $\leq d-1$ (or $r=0$), and $g=qf+r$. Define $T$ on $\mathbb{Q}[x]$ by $T(g)=r$. Then $T$ is a $\mathbb{Q}$-linear application of the $\mathbb{Q}$-vector space $E=\mathbb{Q}[x]$ in the vector space $F$ of the polynomials of degree $\leq d-1$, that is of dimension $d$. Now take $p_1,\ldots,p_{d+1}$ distinct primes numbers. The $T(x^{p_j})$ are not linearly independant in $F$, so there exist $a_j\in \mathbb{Q}$, not all $0$, such that $\displaystyle \sum_j a_jT(x^{p_j})=T\left(\sum_j a_j x^{p_j}\right)=0$, ie $\sum_j a_j x^{p_j}$ is divisible by $f$. Hence there exist $g\in \mathbb{Q}[x]$ such that $\displaystyle f(x)g(x)=\sum_j a_j x^{p_j}$. By multiplying $g$ by a suitable non zero integer, we can suppose that $g \in \mathbb{Z}[x]$.
Let $n$ be the degree of $f$, and let $V_n$ be a $\mathbb{Q}$-vector space of polynomials of degree less than $n$. The vector space dimension of $V_n$ is $n$. Consider $n + 1$ monomials$$x^{p_1}, x^{p_2}, \dots, x^{p_{n+1}},$$where $p_1, p_2, \dots, p_{n+1}$ are arbitrary $n+1$ distinct prime numbers. Consider their remainders modulo $f$. They are $n + 1$ elements of $V_n$, and thus they are linearly dependent. Hence, there are $a_1, a_2, \dots, a_{n+1} \in \mathbb{Q}$ such that$$h(x) = a_1x^{p_1} + a_2x^{p_2} + \dots + a_{n+1}x^{p_{n+1}}$$is divisible by $f$. Clearly, we can assume that $a_1, a_2, \dots, a_{n+1} \in \mathbb{Z}$. Thus, $g$ is the quotient of $h$ by $f$. Scaling $h$ by a proper integer factor, we can also assume that $g \in \mathbb{Z}[x]$ if needed.