Is every $GL_2(\mathbb{Z}/n\mathbb{Z})$-extension contained in some elliptic curve's torsion field? 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.)
 A: This is likely a very hard problem once $n \geq 7$.
Such $E$ are parametrized by a twist of the modular curve ${\rm X}(n)$;
this curve is rational for $n \leq 5$ (so for those $n$ one can use the
Hasse principle), but of genus at least $3$ for $n\geq 7$.  Thus if $n \geq 7$
there are at most finitely many  $E$ (Mordell-Faltings) but we do not have
a general technique for deciding whether one exists.  This was the
main difficulty that Poonen, Schaefer, and Stoll had to overcome 
for several special choices of $K$ in their paper

Bjorn Poonen, Edward F. Schaefer, and Michael Stoll:
  Twists of $X(7)$ and primitive solutions to $x^2+y^3=z^7$,
  Duke Math. J. 137 #1 (2007), 103-158
  (arXiv:math/0508174).

(For $n=6$ the modular curve ${\rm X}(6)$ is isomorphic with the
CM elliptic curve $Y^2 = X^3 + 1$, and the problem reduces to deciding the existence of rational points on a principal homogeneous space 
for a twist $Y^2 = X^3 + d$ of this curve; such questions are often tractable
in practice, though even here no general algorithm is known.)
A: This is mostly adding to Vesselin Dimitrov's comment.
If there exists a regular extension of $\mathbb{Q}(t)$ with Galois group $G := GL_2(\mathbb{Z}/n)$ (ie, $\mathbb{Q}$ is algebraically closed inside the extension), then we can construct a $GL_2(\mathbb{Z}/n)$-Galois extension of $\mathbb{Q}$ which does not contain $\mu_n$, and hence cannot contain $K$ (since any such $K$ must be equal to $\mathbb{Q}(E[n])$).
(I believe it's expected, and certainly proved in some cases, that $GL_2(\mathbb{Z}/n)$ occurs as a regular Galois group over $\mathbb{Q}(t)$, though I'm having trouble finding references.)
Specifically, take a regular $G$-Galois extension of $\mathbb{Q}(t)$, which corresponds to a $G$-Galois cover $Y\rightarrow X$, where $X$ is some open subscheme of $\mathbb{P}^1_{\mathbb{Q}}$.
Let $K$ be any number field (for our purposes lets take $K = \mathbb{Q}(\mu_n)$), then by Hilbert irreducibility, $Y_K\rightarrow X_K$ has infinitely many connected fibers. More specifically, the $K$-points of $X_K$ over which the fiber is disconnected is a thin subset of $X_K(K)$ (One key property of thin sets is that subsets of thin sets are also thin). Let "$A$" denote this subset.
Since $Y_K\rightarrow X_K$ is $G$-Galois, these connected fibers are just $G$-Galois field extensions of $\mathbb{Q}$.
Now consider the set "$B$" of $\mathbb{Q}$-points of $X$, viewed as a subset of $X_K(K)$. I.e., given any map $\text{Spec }\mathbb{Q}\rightarrow X$, we can pull back this map by the natural base change map $X_K\rightarrow X$ to get a map $\text{Spec }K\rightarrow X_K$.
This set $B\subset X_K(K)$ is not thin (e.g. Proposition 3.2.1 in Serre's Topics in Galois Theory). Thus, we have two subsets $A,B\subset X_K(K)$, where $A$ is thin, and $B$ is not thin, and so $B$ is not contained in $A$ - In order words, there exist a $K$-point $x_K\in X_K(K)$, which have connected fiber in $Y_K$, which actually come from a $\mathbb{Q}$-point $x\in X(\mathbb{Q})$, but this means that the fiber of $Y\rightarrow X$ above this $\mathbb{Q}$-point $x$ is connected, and so is equal to $\text{Spec }L$ for some $G$-Galois extension $L/\mathbb{Q}$, and furthermore, since the connected fiber of $Y_K\rightarrow X_K$ above $x_K$ is 
$$\text{Spec }L\times_{\text{Spec }\mathbb{Q}}\text{Spec }K = \text{Spec }L\otimes_{\mathbb{Q}} K$$
this implies that $L\otimes_\mathbb{Q}K$ is a field - in particular $L\cap K = \mathbb{Q}$.
What this says is that if the "regular inverse galois problem" is true for $G$, then for any number field $K$, one can find $G$-Galois extensions of $\mathbb{Q}$ which intersect $K$ trivially.
A: Several remarks:

It should be easy to make counterexamples when $n$ is not a prime power, even with cyclotomic determinant. Let $E_1$ and $E_2$ be non-CM non-isogenous curves. Let $E_r$ have $p-a^r_p+1$ points modulo $p$. Choose a prime $p$ where $a^1_p \neq a^2_p$. Then, if we take $\ell_1$ and $\ell_2$ large enough and distinct, by Serre's open image theorem, we should have $Gal(\mathbb{Q}(E_r[\ell_r])/\mathbb{Q}) \cong GL_2(\mathbb{Z}/\ell_r)$ and (I think) $\mathbb{Q}(E_1[\ell_1])$ and $\mathbb{Q}(E_2[\ell_2])$ dijoint, so $Gal(\mathbb{Q}(E_1[\ell_1], E_2[\ell_2])/\mathbb{Q}) \cong GL_2(\mathbb{Z}/\ell_1) \times GL_2(\mathbb{Z}/\ell_2) \cong GL_2(\mathbb{Z}/(\ell_1 \ell_2))$. 
Suppose there were an elliptic curve $E$ with $E[\ell_1 \ell_2] \cong E_1[\ell_1] \times E_2[\ell_2]$ as Galois modules. Let $E$ have $p-a_p+1$ points modulo $p$. Then $a_p \cong a_p^r \bmod \ell_r$. But, if we choose $\ell_1$ and $\ell_2$ large enough, none of the solutions to $a_p \cong a_p^r \bmod \ell_r$ will lie in $[-2\sqrt{p}, 2\sqrt{p}]$.

If $\ell$ is an odd prime, $K \supset \mathbb{Q}(\mu_{\ell})$ and $Gal(K/\mathbb{Q}) \cong GL_2(\mathbb{F}_{\ell})$, then I claim that we can choose the isomorphism to have cyclotomic determinant. In other words, we can arrange that the diagram 
$$\begin{matrix} 
Gal(K/\mathbb{Q}) &\cong& GL_2(\mathbb{F}_{\ell}) \\
\downarrow && \downarrow \det \\
Gal(\mathbb{Q}(\mu_{\ell}) & \cong & \mathbb{F}_{\ell}^{\times} \\
\end{matrix}$$
commutes, where the left down arrow is the standard Galois theory map and the bottom isomorphism is the standard one.
Proof: Note that 
$$\begin{pmatrix} 1&0 \\0&-1 \end{pmatrix}
\begin{pmatrix} 1&-1 \\0&1 \end{pmatrix}
\begin{pmatrix} 1&0 \\0&-1 \end{pmatrix}
\begin{pmatrix} 1&1 \\0&1 \end{pmatrix}=
\begin{pmatrix} 1&2 \\0&1 \end{pmatrix}$$
is a commutator. Since $\ell$ is odd, this means that its $(\ell+1)/2$-th power, namely $\left( \begin{smallmatrix} 1&1 \\ 0 &1 \end{smallmatrix} \right)$ is in the commutator subgroup, as is $\left( \begin{smallmatrix} 1&0 \\ 1 &1 \end{smallmatrix} \right)$. These generate $SL_2(\mathbb{F}_{\ell})$, so the commutator subgroup is $SL_2(\mathbb{F}_{\ell})$. Thus, any character $GL_2(\mathbb{F}_{\ell}) \to \mathbb{F}_{\ell}^{\times}$ must be some power  of the cyclotomic character $\chi$.
Chase around the diagram left-down-right to map $GL_2(\mathbb{F}_{\ell}) \to \mathbb{F}_{\ell}^{\times}$; let the result be $\chi^k$. Since this map is surjective, $k$ is a unit modulo $\ell-1$; let $j$ be its inverse. Note that $2|\ell-1$ so $j$ is odd, say $j=2r+1$. Modify the top isomorphism by the automorphism $g \mapsto (\det g)^r g$ of $GL_2(\mathbb{F}_{\ell})$, and now the diagram commutes.

I suspect there are fields $K$ with $K \supset \mathbb{Q}(i)$ and $Gal(K/\mathbb{Q}) \cong GL_2(\mathbb{Z}/4)$ where the map 
$$GL_2(\mathbb{Z}/4) \cong Gal(K/\mathbb{Q}) \twoheadrightarrow Gal(\mathbb{Q}(i)/\mathbb{Q}) \cong (\mathbb{Z}/4)^{\times}$$
is not cyclotomic, and can't be made so by any automorphism of $GL_2(\mathbb{Z}/4)$. Namely, there is a map $GL_2(\mathbb{Z}/4) \to \{ \pm 1 \}$ defined as the composition
$$GL_2(\mathbb{Z}/4) \to GL_2(\mathbb{F}_2) \cong S_3 \to \{ \pm 1 \}$$
where the last map is the sign character. This map sends $\left( \begin{smallmatrix} 0 & 1 \\ -1 & 0 \end{smallmatrix} \right)$ to $-1$, while determinant sends it to $1$. The conjugacy class of $\left( \begin{smallmatrix} 0 & 1 \\ -1 & 0 \end{smallmatrix} \right)$ can be intrinsically described as the only conjugacy class which squares to the non-identity central element in $GL_2(\mathbb{Z}/4)$. So no automorphism of $GL_2(\mathbb{Z}/4)$ can equate these characters. 
I see no reason that this map $GL_2(\mathbb{Z}/4) \to \{ \pm 1 \}$ couldn't correspond to an inclusion $\mathbb{Q}(i) \subset K$.
A: Two comments. First, there is a trick used by Serre, Ribet and others to prove, using an old result of Goursat, that under certain assumptions such as absolute irreducibility, two mod p Galois representations cut the same Galois extension if and only if they are twists of each other. I guess using this combined with the reference in a previous answer should be enough to answer your question.
Secondly, if you take n to be a prime power with exponent at least 2, it is not even clear that a mod n representation can be lifted at all to any p-adic representation, even if you admit coefficients in extensions of the p adic field. Further assumptions such as finite ramification set make the question even harder. My guess is that in general you should not expect existence of any geometric p adic lift, in particular this rules out elliptic curves.
A: I have two things to add to this discussion.
$\bullet$ For $n = 2$ and $n = 3$, every Galois extension of $\mathbb{Q}$ with Galois group ${\rm GL}_{2}(\mathbb{Z}/n\mathbb{Z})$ does arise from an elliptic curve (by a result of Shepard-Barron and Taylor from 1997 - see the reference in the paper of Dieulefait linked to below.) For $n = 4$, this is not true (see this paper).
$\bullet$ For $p \geq 7$ prime, it is known that not every Galois representation $\rho : G_{\mathbb{Q}} \to GL_{2}(\mathbb{F}_{p})$ arises from an elliptic curve, even if we restrict $\rho$ to have cyclotomic determinant. This is shown in 
a paper of Dieulefait for $p \geq 7$, because one can construct Galois representations using modular forms of different weights. This somehow doesn't seem quite the same as starting with a field $K/\mathbb{Q}$ with $Gal(K/\mathbb{Q}) \cong GL_{2}(\mathbb{F}_{p})$. (Any two isomorphisms between $Gal(K/\mathbb{Q})$ and $GL_{2}(\mathbb{F}_{p})$ differ by an automorphism of $GL_{2}(\mathbb{F}_{p})$ and I haven't been able to find a convenient reference for what ${\rm Aut}(GL_{2}(\mathbb{F}_{p}))$ is.)
