How exactly is activation energy defined?
You are right that the energy of the initial state is a function of temperature. But in practice for this equation the energy difference $E_\mathrm a$ usually is fixed for an arbitrary temperature (in the middle of the diapason of experimental measurements) and assumed temperature-independent.
From Wikipedia:

While this equation suggests that the activation energy is dependent
on temperature, in regimes in which the Arrhenius equation is valid
this is cancelled by the temperature dependence of $k$. Thus, $E_\mathrm a$ can be
evaluated from the reaction rate coefficient at any temperature
(within the validity of the Arrhenius equation).

As to the physical meaning of activation energy, citing Wikipedia:

Both the Arrhenius activation energy and the rate constant $k$ are
experimentally determined, and represent macroscopic reaction-specific
parameters that are not simply related to threshold energies and the
success of individual collisions at the molecular level.

In other words, activation energy $E_\mathrm a$ is a semi-empirical quantity and is not considered to have a strictly defined physical meaning (at least on molecular level). Note that the Arrhenius equation
$$k=A\exp\left(-\frac{E_\mathrm a}{RT}\right)$$
is itself considered to be a semi-empirical relationship.
In the IUPAC Gold Book (DOI: 10.1351/goldbook.A00102), activation energy is also defined to be an empirically determined quantity, in line with the above:

An empirical parameter characterizing the exponential temperature dependence of the rate coefficient $k$:
$$E_\mathrm a = RT^2 \frac{\mathrm d (\ln k)}{\mathrm dT}$$