Let $f\in\mathbb{Z}[x]$ be monic with $\deg(f)\ge 1$.
For a positive integer $m > 1$, call $f$ reducible, mod $m$, if there exist monic polynomials $g,h\in\mathbb{Z}[x]$ with $g,h\ne 1$ such that $f\equiv gh\;(\text{mod}\;m)$. Otherwise call $f$ irreducible, mod $m$.
Now suppose $m=p_1p_2$, where $p_1,p_2$ are distinct primes.
It's not hard to show that if there exist $a_1,a_2\in\mathbb{Z}$ such that $f(a_1)\equiv 0\;(\text{mod}\;p_1)$ and $f(a_2)\equiv 0\;(\text{mod}\;p_2)$, then there exists $a\in\mathbb{Z}$ such that $f(a)\equiv 0\;(\text{mod}\;m)$, and it follows that $f$ is reducible, mod $m$.
To explore the broad question of how the structure of the reducibility of $f$, mod $p_1$, and the structure of the reducibility of $f$, mod $p_2$, relates to the structure of the reducibility of $f$, mod $m$, I'll consider a special case . . .
Question:$\;$If $f$ with $\deg(f)=4$ is such that
- $f\equiv g_1h_1\;(\text{mod}\;p_1)$, where $g_1,h_1\in\mathbb{Z}[x]$ are monic, quadratic, and irreducible, mod $p_1$.$\\[4pt]$
- $f\equiv g_2h_2\;(\text{mod}\;p_2)$, where $g_2,h_2\in\mathbb{Z}[x]$ are monic, quadratic, and irreducible, mod $p_2$.
must it be the case that $f\equiv gh\;(\text{mod}\;m)$, where $g,h\in\mathbb{Z}[x]$ are monic, quadratic, and irreducible, mod $m$?
Yes, and Aphelli's argument in the comments works; you can just use CRT. However, there is an ambiguity here: you can either try to find a pair of factors congruent to $g_1, h_2$ and $g_2, h_1$ or to $g_1, h_1$ and $g_2, h_2$. Both of these work, which tells you that polynomials $\bmod p_1 p_2$ do not have unique factorization. So be careful reasoning about this!