I'll set $\epsilon=1$, $\mu=1$, and $\mathbf{J}=0$, because these simplifications don't affect the question about signs. The difference between the vacuum equations (using $\mathbf{B}$) and the in-material equations (using $\mathbf{H}$) is also peripheral to the question about signs, because the equations have the same structure either way. This answer considers the vacuum equations because this simplifies the wording.
The observables are the real-valued electric field $\mathbf{E}(t)$ and the real-valued magnetic field $\mathbf{B}(t)$, and the energy density is $(\mathbf{E}^2+\mathbf{B}^2)/2$. The question is about how this relates to a relative minus sign in the case of complex-valued fields. The answer may be more satisfying if we remember why complex-valued versions of $\mathbf{E}$ and $\mathbf{B}$ are sometimes used. We can always write
\begin{gather*}
\newcommand{\bfB}{\mathbf{B}}
\newcommand{\bfH}{\mathbf{B}}
\newcommand{\bfE}{\mathbf{E}}
\newcommand{\real}{\text{real}}
\bfE(t) = \bfE^+(t)+\bfE^-(t)
\\
\bfB(t) = \bfB^+(t)+\bfB^-(t)
\tag{1}
\end{gather*}
where $X^\pm(t)$ are the positive- and negative-frequency parts of $X(t)$, which can each be obtained from the real-valued field $X(t)$ using a Hilbert transform. (In quantum field theory, they correspond to the photon-annihilating and photon-creating parts of the field operator, respectively.) The original real-valued fields $\bfE(t)$ and $\bfB(t)$ are the observables, but working with their complex-valued positive- and negative-frequency parts can sometimes be convenient. One application is highlighted below, one that relates directly to the question.
A general mathematical result
Suppose that $\bfE(t)$ and $\bfB(t)$ are complex-valued fields satisfying the equations
\begin{gather*}
\nabla\times\bfH = \dot\bfE
\\
\nabla\times\bfE = -\dot\bfH
\tag{2}
\end{gather*}
where $\dot X$ denotes the time-derivative of $X$. When the fields are real-valued, these are Maxwell's equations. Take the dot-product of $\bfE$ with the complex-conjugate of the first equation, take the dot-product of $\bfH^*$ with the second equation, subtract the two resulting equations, and use the identity
$$
\bfE\cdot(\nabla\times\bfH^*)
-
\bfH^*\cdot(\nabla\times\bfE)
=
\nabla\cdot(\bfH^*\times\bfE)
\tag{3}
$$
to get the general result
$$
\nabla\cdot(\bfH^*\times\bfE)
= \bfE\cdot\dot\bfE^* + \bfH^*\cdot\dot\bfH.
\tag{4}
$$
This mathematical result holds independently of any physical interpretation of the complex-valued fields.
Physical meaning in the real-valued case
When the fields are real-valued, equations (2) are Maxwell's equations, and the result (4) can be written
$$
\nabla\cdot(\bfH\times\bfE)
= \frac{\partial}{\partial t}\frac{\bfE^2 +\bfH^2}{2}.
\tag{5}
$$
Equation (5) is a local conservation law: the left-hand side involves the spatial derivatives of the momentum density (Poynting vector), and the right-hand side involves the time-derivative of the energy density.
In a material medium, we can account for some of the material's properties by replacing $\mathbf{B}$ with $\mathbf{H}$ in all of these equations. Then the momentum and energy densities in (5) include effects of the material as well as the electromagnetic field itself, but the math is the same. I'm considering the vacuum case to avoid distracting caveats about the meaning of "energy density."
Another conservation law
The positive- and negative-frequency parts of a field may be expressed in terms of the original real-valued field, and this relationship — the Hilbert transform — is linear. (It's non-local in time, but that's not an obstacle here.) Because it is linear, the fact that the real-valued fields satisfy Maxwell's equations implies that the positive- and negative-frequency parts do, too. Use this together with $(X^+)^* = X^-$ to see that equation (4) implies
$$
\nabla\cdot(\bfH^+\times\bfE^-)
= \bfE^-\cdot\dot\bfE^+ + \bfH^+\cdot\dot\bfH^-.
\tag{6}
$$
Add equation (6) to its own complex-conjugate to get
$$
\nabla\cdot(\bfH^+\times\bfE^- + \bfH^-\times\bfE^+)
= \frac{\partial}{\partial t}
\big(\bfE^-\cdot\bfE^+ + \bfH^-\cdot\bfH^+\big).
\tag{7}
$$
This is another local conservation law, but it is not equivalent to (5). In particular, the right-hand side is not the time-derivative of the energy density. The energy density in (5) includes terms involving the squares of the positive- and negative-frequency parts. Those terms are missing in (7).
However, equation (7) can still be used as an approximation to (5) under special conditions. If the wave has a relatively narrow bandwidth, then the terms that are missing from (7) will be relatively rapidly oscillating functions of time, and we can eliminate these terms by averaging equation (5) in time — that is, by convolving equation (5) with a window function of sufficiently long duration. This is related to the fact that relationship between the original real-valued field $X(t)$ and its positive- and negative-frequency parts $X^\pm(t)$ is non-local in time.
By the way, in a quantum optics context, equations (5) and (7) become equivalent when restricted to states having a well-defined number of photons — but such states do not have well-defined values of the electric/magnetic fields.
The answer
Now suppose that we have a real-valued solution of Maxwell's equations involving only a single frequency. Then
$$
\bfE^+ = \bfE_0 e^{i\omega t}
\hskip2cm
\bfH^+ = \bfH_0 e^{i\omega t}
\tag{8}
$$
for some complex-valued coefficients $\bfE_0$ and $\bfH_0$. In this case, equation (6) becomes
$$
\nabla\cdot(\bfH^+\times\bfE^-)
= i\omega\big(\bfE_0^*\cdot \bfE_0-\bfH_0^*\cdot\bfH_0\big).
\tag{9}
$$
Now we can clearly see the reason for the sign-difference noted in the question. It's simply because in equation (6), the time-derivative acts on $\bfE^+$ and $\bfH^-$, which in this example are proportional to $e^{i\omega t}$ and $e^{-i\omega t}$, respectively.
Another perspective: Equation (6) is only "half" of the conservation law (7). When we use (8) in equation (7), we see that the left- and right-hand sides are both equal to zero. In particular, the quantity $(\bfE^-\cdot\bfE^+ + \bfB^-\cdot\bfB^+)/2$ is indepenent of time. For a wave with narrow bandwidth (which is certainly true of the example (8)), this quantity is a time-smeared approximation to the full energy dentity in equation (5). The minus sign between the two terms on the right-hand side of (9) has no general physical significance, because (9) is just a special trick for dealing with single-frequency fields, and equations (5) and (7) show that even in this case the electric and magnetic terms always contribute to the energy density (time-averaged or not) with the same sign.
The sign difference in (9) also has nothing to do with the relationship between the lagrangian and the energy. However, the sign-difference between the energy $\sim \bfE^2 + \bfB^2$ and the lagrangian $\sim \bfE^2 - \bfB^2$ is directly related to the corresponding sign difference in single-particle mechanics, where the energy is $\sim p^2+V$ and the lagrangian is $\sim p^2-V$. The relationship becomes clear when the lagrangian is written in terms of a gauge field $\mathbf{A}$ in the Coulomb gauge.