The answer is θ:p↦p(c), for each choice of c∈Z. Obviously these work, so we prove these are the only ones. In what follows, x∈Z[x] is the identity polynomial, and c=θ(x).
First solution (Merlijn Staps) Consider an integer n=c. Because x−n∣p(x)−p(n), we have
θ(x−n)∣θ(p(x)−p(n))⟹c−n∣θ(p(x))−p(n).
On the other hand, c−n∣p(c)−p(n). Combining the previous two gives c−n∣θ(p(x))−p(c), and by letting n large we conclude θ(p(x))−p(c)=0, so θ(p(x))=p(c).
Second solution First, we settle the case degp=0. In that case, from the second property, θ(m)=m+θ(0) for every integer m∈Z (viewed as a constant polynomial). Thus m+θ(0)∣2m+θ(0), hence m+θ(0)∣−θ(0), so θ(0)=0 by taking m large. Thus θ(m)=m for m∈Z.
Next, we address the case of degp=1. We know θ(x+b)=c+b for b∈Z. Now for each particular a∈Z, we have
c+k∣θ(x+k)∣θ(ax+ak)=θ(ax)+ak⟹c+k∣θ(ax)−ac.
for any k=−c. Since this is true for large enough k, we conclude θ(ax)=ac. Thus θ(ax+b)=ac+b.
We now proceed by induction on degp. Fix a polynomial p and assume it's true for all p of smaller degree. Choose a large integer n (to be determined later) for which p(n)=p(c). We then have
c−np(c)−p(n)=θ(x−np−p(n))∣θ(p−p(n))=θ(p)−p(n).
Subtracting off c−n times the left-hand side gives
c−np(c)−p(n)∣θ(p)−p(c).
The left-hand side can be made arbitrarily large by letting n→∞, since degp≥2. Thus θ(p)=p(c), concluding the proof.