No. Some conditions are needed on the $a_i$ and $p_i$. For instance, take n=2, $a_1 = a_2 = 2$, $p_1 = p_2 = 2$. Then $x = 2 \sqrt{2}$, which has minimal polynomial $x^2 - 8$. As an even simpler example, n=1, $a_1 = 2$, $p_1 = 4$, then $x$ is rational.
For a less trivial example, take $a_1= 4$, $a_2 = 6$, $p_1=p_2=2$. Check that this has a polynomial of degree 12. In fact, this isn't really true at all.
One can, however, prove that the degree of the minimal polynomial is at most $\prod a_n$, which is an easy exercise in field theory. Any graduate algebra textbook covering Galois theory will be more than sufficient to prove this; just remember the degree of the minimal polynomial is the same as the dimension of the extension field viewed as a vector space over the base field.