Yes, there is a reason that the form of the invariants is a mixed sign quadratic form. It comes from the fact that in both cases, the quantities involved are components of a Lorentz tensor, and both expressions are contractions of a Lorentz tensor with itself and with the Minkowski tensor.
Any Lorentz tensor defines an invariant when it is contracted with itself and with the Minkowski tensor, which has components
$$
\eta_{\mu\nu} =
\begin{bmatrix}
-1~~~ & \!\!\! 0 & 0 & 0~~ \\
0 & \!\!\!1 & 0 & 0~~ \\
0 & \!\!\!0 & 1 & 0~~ \\
0 & \!\!\!0 & 0 & 1~~
\end{bmatrix},
$$
the latter used the appropriate number of times to get a single number. Notice one entry is negative; this causes the invariant quadratic form to have a negative square term in it.
$\mathscr{E},p_1,p_2,p_3$ are components $p^\mu$ of the tensor of energy-momentum of a particle, and $E_1,E_2,E_3,B_1,B_2,B_3$ are components $F^{\mu\nu}$ of the Faraday tensor of EM field.
The contraction definining an invariant number looks like this for rank 1 tensors:
$$
C_1 = \eta_{\rho\sigma} p^{\sigma} p^{\rho} = p_\rho p^\rho,
$$
giving $C_1 = -\mathscr{E}^2/c^2 + p^2$, and like this for rank 2 tensors ($\eta$ is used twice):
$$
C_2 = \eta_{\rho\alpha}\eta_{\sigma\beta} F^{\rho\sigma} F^{\alpha\beta} = F_{\alpha\beta} F^{\alpha\beta},
$$
giving $C_2 = -2(E_1^2 + E_2^2 + E_3^2)/c^2 + 2(B_1^2 + B_2^2 + B_3^2)$ .