I suppose this question could be phrased in terms of Galois representations, but I'm asking it this way.
Let $n>1$ be an integer. If $K$ is a number field with $\operatorname{Gal}(K/\mathbb{Q}) \cong GL_2(\mathbb{Z}/n\mathbb{Z})$ (edit) and containing the $n$-th roots of unity (/edit), must there exist an elliptic curve $E$ defined over $\mathbb{Q}$ such that $K \subseteq \mathbb{Q}(E[n])$? It's not necessary to produce the curve, although it would be cool.
If not, is there a good way to test if this holds for a given $K$?
(If you want to restrict to the case where $n$ is a prime power, that's fine.)