How can one understand the Eisenstein series E2 in terms of automorphic representation?

Excellent question indeed. The quick answer is that $E_2(z)$ is an almost holomorphic modular form of weight $2$ and level $1$, so the automorphic representation generated by it is not irreducible. For more details (and my thought process), read below.

Consider the Maass raising operator in weight $0$, $$ R:=y\left(i\frac{\partial}{\partial x}+\frac{\partial}{\partial y}\right).$$ Let $(m,n)\in\mathbb{Z}^2$ be a nonzero pair of integers. Then a small calculation gives that, for $z=x+iy$ and $s\in\mathbb{C}$, $$ R\left(\frac{y^s}{|mz+n|^{2s}}\right) =\frac{sy^s}{(mz+n)^2|mz+n|^{2s-2}}.$$

Now let us introduce the usual weight $0$ level $1$ (nonholomorphic) Eisenstein series $$ E(z,s):=\sum_{\substack{m, n \in \mathbb{Z} \\ (m, n) \ne (0,0)}} \frac{\operatorname{Im}(z)^s}{|mz + n|^{2s}},\qquad \operatorname{Re}(s)>1$$ then we see that $$ R\,E(z,s+1) = (s+1)\,yE_2(z,s),\qquad \operatorname{Re}(s)>0.\tag{1}$$ On the right hand side, $yE_2(z,s)$ is the canonical weight $2$ level $1$ (nonholomorphic) Eisenstein series, the one which transforms as a weight $2$ Maass form. It is worthwhile to recall here that weight $k$ holomorphic forms embed into the weight $k$ Maass spectrum by multiplying each weight $k$ holomorphic form by $y^{k/2}$. In our case $k=2$, which explains why we multiply by $y$.

So your Eisenstein series, after inserting the factor $y$ to make it into a canonical weight $2$ form, and also inserting the scaling factor $s+1$, equals the Maass raising shift of $E(z,s+1)$. It belongs to the same automorphic representation as $E(z,s+1)$, hence it has the same Langlands parameters as $E(z,s+1)$ at every place. In particular, the archimedean Langlands parameters are $$ (s+1)-\frac{1}{2}=s+\frac{1}{2}\qquad\text{and}\qquad \frac{1}{2}-(s+1)=-s-\frac{1}{2}.$$

Added and revised. Well, we still need to specify all this to $s=0$, but in this case the above argument breaks down, because $E(z,s+1)$ has a pole at $s=0$. So we need to be more careful. Let us use the results and notation of Section 4 of Duke-Friedlander-Iwaniec: The subconvexity problem for Artin L-functions (Invent. Math. 149 (2002), 489-577). Then for $\operatorname{Re}(s)>1$ we have the Fourier decomposition \begin{align*} \frac{1}{2}E(z,s)&=\ \zeta(2s)y^s+\pi^{2s-1}\frac{\Gamma(1-s)}{\Gamma(s)}\zeta(2-2s)y^{1-s}\\&+\ \frac{\pi^s}{\Gamma(s)}\sum_{n=1}^\infty\frac{\sigma_{2s-1}(n)}{n^s}\bigl\{f_0^+(nz,s)+f_0^-(nz,s)\bigr\}.\end{align*} Let us replace $s$ by $s+1$ here, and then apply the raising operator $R$ along with $(1)$. Then for $\operatorname{Re}(s)>0$ we obtain the Fourier decomposition \begin{align*} \frac{1}{2}E_2(z,s)&=\ \zeta(2s+2)y^s+\pi^{2s+1}\frac{\Gamma(1-s)}{\Gamma(2+s)}\zeta(-2s)y^{-s-1}\\&-\ \frac{\pi^{s+1}}{y\Gamma(2+s)}\sum_{n=1}^\infty\frac{\sigma_{2s+1}(n)}{n^{s+1}}\bigl\{f_2^+(nz,s+1)+s(s+1)f_2^-(nz,s+1)\bigr\}.\end{align*} The right hand side is indeed holomorphic at $s=0$, and at this value it specifies to \begin{align} \frac{1}{2}E_2(z)&=\ \frac{\pi^2}{6}-\frac{\pi}{2y}- \frac{\pi}{y}\sum_{n=1}^\infty\frac{\sigma_1(n)}{n}f_2^+(nz,1)\\ &=\ \frac{\pi^2}{6}-\frac{\pi}{2y}-4\pi^2\sum_{n=1}^\infty\sigma_1(n)e(nz).\tag{2}\end{align} It is clear now that the $L$-function of $E_2(z)$ is $\zeta(s-1/2)\zeta(s+1/2)$, and $E_2(z)$ should belong to the holomorphic discrete series of weight $2$ even though its constant term is not holomorphic. I think this paradox arises from the fact that $E_2(z)$ is not a true automorphic form. (More precisely, $E_2(z)$ is not a vector from an irreducible automorphic representation, see the Added 3 section below.)

Added 2. Indeed, $E_2(z)$ is an almost holomorphic modular form of weight $2$ and level $1$: it equals $2G_2^*(z)$ in the notation of Section 2.3 of Bruinier-v.d.Geer-Harder-Zagier's book "The 1-2-3 of modular forms". In particular, (19) and (21) in this book reveal that $E_2(z)$ transforms precisely like a holomorphic modular form of weight $2$ and level $1$, even though it is not holomorphic. Of course, the same also follows from the fact that $E_2(z)=\lim_{s->0+}E_2(z,s)$, where $yE_2(z,s)$ for $\operatorname{Re}(s)>0$ transforms precisely like a Maass form of weight $2$ and level $1$. One can read more about almost holomorphic modular forms in Section 5.3 of the book.

Added 3. We can learn more by applying the Maass lowering operator in weight $2$, $$L:=1+y\left(i\frac{\partial}{\partial x}-\frac{\partial}{\partial y}\right).$$ Using the Fourier decomposition (2), we can see directly that $$ L(yE_2(z))=-\pi, $$ which harmonizes with the facts that $ L(yE_2(z,s)) = -s E(z,s+1)$ for $\operatorname{Re}(s)>0$ and $\operatorname{res}_{s=0}E(z,s+1)=\pi$. So we see that the automorphic representation generated by the weight $2$ vector $yE_2(z)$ is reducible: it contains the trivial representation $\mathbb{C}$ as a subrepresentation, while its quotient by $\mathbb{C}$ is irreducible and belongs to the holomorphic discrete series of weight $2$. See also Theorem 2.5.2 in Bump: Automorphic forms and representations, specified to $k=2$ and $\lambda=0$, which helped me understand what is going on.


(I took @LSpice's inquiry as encouragement to add some remarks to @GH from MO's good answer... But/and one of the issues that helped me overcome my skepticism about the utility of representation theory long ago was its clarification of exactly these issues about "Hecke summation", Maass-Shimura operators, and such. In particular, that it is not necessary to write out Fourier expansions using special functions, etc.)

First, as in the comments that helped @GH...'s answer get on track, in a typical (naive) indexing scheme, the $2k$-th holomorphic discrete series is not a subrepresentation of the $2k$-th principal series (also in a naive normalization), but just of the $k$-th. Also, there are choices about when-and-how to append/renormalize the $y^k$ to weight-$2k$ automorphic forms, to make them left $\Gamma$-invariant and right $K$-equivariant. Lots of chances to make a mess...

A more interesting issue than normalization is the fact that (the map...) formation of Eisenstein series (manifestly) does not commute with meromorphic continuation. Such a thing already occurs in looking at the spectral decomposition of the space of pseudo-Eisenstein series in terms of Eisenstein series.

For generic principal series $I_s$, the raising and lowering operators $R,L$ change the $K$-type by $\pm 2$, with the lowering operator having a coefficient of $s-k$ (here the normalization matters, obviously). So, up to irrelevant constants, with $E_{s,2k}$ being the Eisenstein series hit by $I_s$ with $K$-type $2k$, $LE_{s,2k}=(s-k)E_{s,2k-2}$. Thus, at $s=1$, if $E_{s,2k-2}$ has no pole, then $E_{s,2k}$ is annihilated by the lowering operator.

It is partly some sort of crazy luck that the lowering operator $L$, in coordinates, is essentially the Cauchy-Riemann operator, so annihilation by it implies holomorphy.

But/and of course with $2k=2$, the Eisenstein series $E_{s,0}$ has a pole at $s=1$. The residue is just a constant, not very exciting, but not $0$. Thus, in whatever normalization one operates, the application of the lowering operator (Cauchy-Riemann) to (the meromorphically continued) $E_{s,2}$ gives that residue, not $0$.

For Hilbert modular forms over (totally real) number fields of degree $>1$ over $\mathbb Q$, the lowering operators attached to the various archimedean factors of the group do not map $E_{s,(2,2,2,2,...)}$ to $E_{s,0}$, where there is a pole, so they annihilate $E_{s,(2,2,...)}$.

The weight-one Eisenstein series are another story...

(Edit: some "$s-1$"'s should have been "$s-k$"'s, but I was thinking about $k=1$... maybe repaired...)