Singular abelian surfaces that can be defined over $\mathbb Q$ An abelian surface $A$ is called singular if it has maximal Picard number $\rho(A) = 4$. 
By work of Shioda-Mitani, any singular abelian surface $A$ is the product $A = E_1 \times E_2$ of two isogenous elliptic curves with complex multiplication. If both $E_1$ and $E_2$ are defined over $\mathbb Q$, then $A$ is of course defined over $\mathbb Q$.
Are there examples of singular abelian surfaces $A$ defined over $\mathbb Q$ which cannot be written as the product of two elliptic curves defined over $\mathbb Q$?
 A: This is a complement to Joe Silverman's answer and is a bit long for a comment. One seeks to find a $\mathbb{Q}$-curve $E$ so that $\mathbb{Q}(j(E))$ is a quadratic extension of $\mathbb{Q}$. One such $\mathbb{Q}$-curve is $E : y^{2} + \sqrt{2} xy + y = x^{3} + x^{2} + (-2\sqrt{2} - 3) x + \sqrt{2} + 1$, which has CM by $\mathbb{Z}[\sqrt{-6}]$. Moreover, according to the LMFDB database of genus 2 curves, if $C : y^{2} + x^{3} y = x^{3} + 2$, then the Jacobian of $C$ is isogenous to the square of $E$. Is it true that the Jacobian of $C$ is isomorphic to this product? Apparently, Shioda and Mitani proved that if an abelian surface is isogenous to a product of two isogenous elliptic curves with CM, then it is isomorphic to a product of two elliptic curves (which must be isogenous and have CM, necessarily).
Note: I don't think one needs to have a $\mathbb{Q}$-curve whose $j$-invariant is defined over a quadratic extension. Another example is $C : y^{2} = x^{5} - x$ whose Jacobian decomposes as the square of a $\mathbb{Q}$-curve defined over $\mathbb{Q}(\sqrt{2})$ which is not a base change from $\mathbb{Q}$, but whose $j$-invariant is $8000$.
A: I think that what you want is contained in the theory of $\mathbb Q$-curves, which are elliptic curves defined over $\overline {\mathbb Q}$ that are isogenous to all of their Galois conjugates. Dick Gross studied CM $\mathbb Q$-curves in his thesis, which was published in [1]. So you'd need to use Gross' work to find a CM $\mathbb Q$-curve $E$ such that $\mathbb Q(j(E))$ is a quadratic extension of $\mathbb Q$.
[1] Gross, Benedict H.
Arithmetic on elliptic curves with complex multiplication.
With an appendix by B. Mazur. Lecture Notes in Mathematics, 776. Springer, Berlin, 1980. iii+95 pp. MR0563921 
