A number $a$ is a square in $\mathbf{Q}$ if and only if it is a square in $\mathbf{R}$ and $\mathbf{Q}_p$ for all primes $p$

It doesn't make sense to consider the intersection of all of the $\mathbb Q_p$, since they are not all contained in some bigger field. In fact, the result is false in general! For example the polynomial $$3X^3+4X^3+5Y^3$$ has a root in $\mathbb R$ and $\mathbb Q_p$ for all $p$, but not in $\mathbb Q$.

In this case if $a$ is not a square in $\mathbb Q$, either $a$ is negative, in which case it has no solutions in $\mathbb R$, or without loss of generality, by replacing $X$ with $pX$ as necessary, we can assume that $a$ is square free. So $X^2-a$ is Eisenstein for any $p\mid a$.


Another argument, which some people may like better:

If a rational is a square, then certainly it’s a square in every $\Bbb Q_p$. It’s the converse that’s interesting. Any rational $\lambda$ has a unique representation $\lambda=(-1)^\varepsilon\prod_pp^{v_p(\lambda)}$, where $\varepsilon$ is $0$ or $1$, and the (finite) product over all primes has the exponents $v_p(\lambda)=$ the $p$-order of $\lambda$. Any square in $\Bbb Q_p$ has even $p$-order, so every exponent in the product above is even, and $\varepsilon=0$ to give a positive rational, necessary for it to be a square in $\Bbb R$. And that does it.