I am getting very confused. For any prime $p$, We have the following obvious maps:
$$\mathbb{Q}[X_0,\dots,X_n] \overset{\iota}{\hookleftarrow} \mathbb{Z}[X_0,\dots,X_n] \overset{\phi_p}{\twoheadrightarrow} \mathbb{F}_p[X_0,\dots,X_n],$$
where $\iota$ is the inclusion and $\phi_p$ is the quotient modulo $p$. Then we should have maps of prime ideals
$$\mathrm{Spec}\ \mathbb{Q}[X_0,\dots,X_n] \overset{\iota^{-1}}{\longrightarrow} \mathrm{Spec}\ \mathbb{Z}[X_0,\dots,X_n] \overset{\phi_p}{\longrightarrow} \mathrm{Spec}\ \mathbb{F}_p[X_0,\dots,X_n].$$
What I don't understand is why this does not work. For instance, $XY^2-pZ^3$ is irreducible in $\mathbb{Q}[X,Y,Z]$, because it is an Eisenstein polynomial with respect to the prime ideal $(X) \subseteq \mathbb{Q}[X,Y]$. Hence, the homogeneous ideal $I=(XY^2-pZ^3) \subseteq \mathbb{Q}[X,Y,Z]$ is prime, but its image $I_p=(XY^2) = (X)(Y^2) \subseteq \mathbb{F}_p[X,Y,Z]$ is not prime. What am I missing?
You have a map $$\mathrm{Spec}\ \mathbb{F}_p[X_0,\dots,X_n] \overset{\phi_p^{-1}(\cdot)}{\longrightarrow} \mathrm{Spec}\ \mathbb{Z}[X_0,\dots,X_n],$$ which sends the ideal $(\bar f_1, ..., \bar f_n)$ to $(p, f_1, ..., f_n)$ ; this is the contraction of ideals.
Your trouble comes from the fact that the extension $\phi_p(\cdot)$ does not provide a map $$\mathrm{Spec}\ \mathbb{Z}[X_0,\dots,X_n] \overset{\phi_p(\cdot)}{\longrightarrow} \mathrm{Spec}\ \mathbb{F}_p[X_0,\dots,X_n].$$