Is it possible to derive the quadratic energy expression from the wave equation and Lorentz force?
This is not possible, because those equations do not involve EM energy. EM energy has to be defined, just as kinetic energy of point mass has to be defined (and cannot be derived). What can be derived are equations that motivate such definitions.
If the charge and current densities $\rho,\mathbf j$ are regular enough (so that $\mathbf j\cdot\mathbf E$ is mathematically defined so it is integrable), Maxwell's equations alone imply the Poynting theorem:
$$
\mathbf j\cdot \mathbf E = -\partial_t\bigg(\frac{1}{2}\epsilon_0 E^2 + \frac{1}{2\mu_0}B^2\bigg) - \nabla\cdot(\mathbf E\times\mathbf B/\mu_0) .
$$
We can integrate both sides over some fixed volume $V$, apply some math theorems and get:
$$
\int_V\mathbf j\cdot \mathbf E~dV + \oint_{\partial V} d\mathbf a\cdot (\mathbf E\times\mathbf B/\mu_0 ) = -\partial_t\int_V\frac{1}{2}\epsilon_0 E^2 + \frac{1}{2\mu_0}B^2~dV,
$$
where the integral over $\partial V$ is over the boundary surface enclosing $V$, ($d\mathbf a$ is infinitesimal surface area vector).
We can interpret the first term on the left as work of electric forces per unit time, the second term as EM energy leaving $V$ through its boundary per unit time, and the right-hand side as decrease of EM energy in the volume $V$ per unit time. Based on this interpretation, we can define EM energy in the volume $V$:
$$
E_{EM} = \int_V\frac{1}{2}\epsilon_0 E^2 + \frac{1}{2\mu_0}B^2~dV
$$
with volume density
$$
w = \frac{1}{2}\epsilon_0 E^2 + \frac{1}{2\mu_0}B^2,
$$
and similarly, we can define EM energy flux for $\partial V$ (energy leaving the region $V$ through its boundary $\partial V$ per unit time):
$$
P_{EM} = \oint_{\partial V} d\mathbf a\cdot (\mathbf E\times\mathbf B/\mu_0 )
$$
with flux density:
$$
\mathbf S = \mathbf E\times\mathbf B/\mu_0.
$$
When in vacuum, these expressions are also called the Poynting energy density and the Poynting vector. The theorem and its interpretation hold in any medium, vacuum or material.
However, in material media it is customary to exclude polarization and magnetization currents from $\mathbf j$, introduce $\mathbf D,\mathbf H$, and do similar procedure. This cannot proceed, however, if there is no simple relation between $\mathbf D$ and $\mathbf E$. Only in the idealized but important case of linear medium, where $\mathbf D$ is linear function of $\mathbf E$, it is possible to arrive at similar result as above, and get somewhat different definitions of EM energy and EM energy flux:
$$
w = \frac{1}{2}\mathbf E\cdot \mathbf D + \frac{1}{2}\mathbf H\cdot \mathbf B.
$$
$$
\mathbf S = \mathbf E\times\mathbf H.
$$
These are also called the Poynting density and the Poynting vector. However, strictly speaking, in medium, these are not purely EM energy and flux, but include also energy and energy flux due to the polarized/magnetized matter.