You have to use Evaluate:
Plot[{Test[1], Test[2], Test[3], Test[4]}, {x, 0, 5},
PlotLegends -> {Test[1], Test[2], Test[3], Test[4]},
GridLines -> Automatic]
The problem is that Test[n_]
is defined with a delayed definition Test[n_] :=
and the numerical values of x
are replaced in Test[1] before its definition is applied. The expressions E_n were defined with immediate evaluation.
It is indeed rather subtle.