This is precisely the content of Harish-Chandra's theorem ("Automorphic forms on Semisimple Lie Groups", LNM 68, 1968), proven for general reductive groups:

Fix a finite-dimensional representation $\delta$ of $K_\infty$, an ideal $J$ of finite co-dimension in ${\mathcal Z}({\mathfrak g})$, a compact open subgroup $L$ of $K_{\rm fin}$ (the maximal compact subgroup of $G_{\mathbb A_{\rm fin}})$, and a central character $\omega$, then the space of $K$-finite automorphic forms $f$ with central character $\omega$ and $K_\infty$-type $\delta$ that are right $L$-invariant and annihilated by $J$ is finite dimensional.

To see how this corresponds to your case, fix a representation $\pi_\infty$. For simplicity, assume $\pi_\infty$ is spherical. Thus $\delta$ is the trivial representation. Any vector $\phi$ generating $\pi_\infty$ will be an eigenvector for the Casimir operator, $C\phi=\lambda\phi$, so we take $J$ to be the ideal generated by $(C-\lambda)$. And since $\chi(K)$ is a compact totally disconnected subgroup of ${\mathbb C}^\times$, the kernel of $\chi$ must be a compact-open subgroup $L$, so any $\phi$ will be right $L$-invariant. The only thing left is the central character. The archimedean part is fixed as well as the restriction to a compact open subgroup, so there should only be finitely many options left.

A proof for $SL_2({\mathbb R})$ can be found in Chapter 8 of Borel's "Automorphic forms on $SL_2({\mathbb R})$". The general argument is sketched in section 8 of Borel's contribution to Sarnak and Shahidi's "Automorphic Forms and Applications".