What is the Galois group of the modular equation? Let $j(\tau)$ be the modular invariant. Let $\mathcal M_n^*$ be the set of all $2$-by-$2$ matrices with relatively prime integer entries and with determinant $n$. The modular equation is defined by 
$$\Phi_n(X,j(\tau))=\prod_{M\in \operatorname{SL}_2(\mathbf Z)\backslash\mathcal M_n^*}(X-j(M\tau)).$$
What is the Galois group of the polynomial $\Phi_n(X,X)$?
For more details on the modular equation, see
Zagier: Elliptic Modular Forms and Their Applications, p. 68
Andrew Sutherland: The modular equation
 A: A long comment
It is easier to look at $A_n = \{ M\in M_n(\Bbb{Z}), \det(M)=n\}$ $$\psi_n(X,z) = \prod_{M \in SL_2(\Bbb{Z})\setminus A_n} (X-j(Mz))$$ The coefficients of the polynomial are meromorphic $SL_2(\Bbb{Z})$-invariant with poles only at $i\infty$ where they have rational $q$-expansion so that $$ \psi_n(X,z)= \Psi_n(X,j(z)), \qquad \Psi_n(X,Y)\in \Bbb{Q}[X,Y]$$
$j$ is an isomorphism $SL_2(\Bbb{Z})\setminus\Bbb{H} \to \Bbb{C}$ thus the zeros of $$\Psi_n(j(z),j(z)) =\prod_{M\in SL_2(\Bbb{Z})\setminus A_n}(j(z)-j(Mz))$$ are the $j(z),\Im(z)>0$ such that $SL_2(\Bbb{Z}) z \in SL_2(\Bbb{Z}) A_n z\implies z \in A_n z$
$$\implies z= \frac{az+b}{cz+d}, \qquad ad-bc=n$$ It means $cz^2+(a-d)z-b=0$ so $cz+d$ is the algebraic integer $$cz+d = t/2\pm \sqrt{(t/2)^2-n}\in O_K,\qquad K=\Bbb{Q}(\sqrt{(t/2)^2-n}), t=a+d,(t/2)^2-n<0$$
$\Bbb{Z}+z\Bbb{Z}=\Bbb{Z}+\frac{az+b}{cz+d}\Bbb{Z}$ means $(cz+d)(\Bbb{Z}+z\Bbb{Z})=(cz+d)\Bbb{Z}+(az+b)\Bbb{Z}$ so the lattice $\Bbb{Z}+z\Bbb{Z}$ has CM by $\Bbb{Z}[cz+d]$.
Conversely if a lattice $\Bbb{Z}+w\Bbb{Z}$ has CM by $\Bbb{Z}[cz+d]$ then 
$cz+d = Cw+D \in \Bbb{Z}+w\Bbb{Z}$ and $(Cw+D) w \in \Bbb{Z}+w\Bbb{Z}$ so that $w =\frac{Aw+B}{Cw+D}$ which is the same equation as above with $N=AD-BC$ instead of $n$, and since $t,n$ can be recovered just from $cz+d$ it means $N=n$ and $\Psi_n(j(z),j(z))=0$.

Thus for a lattice $L$ then $\Psi_n(j(L),j(L))=0$ iff for some $t^2<4n$, $(t/2\pm \sqrt{(t/2)^2-n})L \subset L$.

To enumerate all such lattices we could enumerate the $t^2<4n$, the rings $O_K\supset R\supset \Bbb{Z}[ t/2\pm \sqrt{(t/2)^2-n}]$ and the classgroup $Cl(R^\land)$ of the ring with CM exactly by $R$, then $\Psi_n(j(L),j(L))=0$ iff $L = r \mathfrak{c}$ for some $\mathfrak{c} \in Cl(R^\land)$.
The Galois group of $\Psi_n(X,X)\in \Bbb{Q}[X]$ will permute and exchange $Cl(R^\land),Cl(\overline{R}^\land)$ where $\overline{R}$ is the complex conjugate ring.
