Do there exist first principles for deriving a Lagrangian density? Yes. Our current understanding of the electromagnetic field is that its dynamics possess symmetry under "gauge transforms" and symmetry under a set of geometric transforms. The first, alone, suffices to give you the framework of "Maxwell's Equations", while the second fills in a missing piece to the puzzle: the "constitutive relations".
The field is described, fundamentally, by a gauge potential, which in component form is given by a one-form $A = A_μ dx^μ$. I'm using the Einstein summation convention here and throughout. For coordinates $\left(x^0, x^1, x^2, x^3\right) = (t, x, y, z)$ it consists of the "electric potential" $φ = -A_0$ and "magnetic potential" $𝐀 = \left(A_x, A_y, A_z\right) = \left(A_1, A_2, A_3\right)$.
The gauge transform is given, in infinitesimal form, by:
$$Δφ = \frac{∂χ}{∂t}, \hspace 1em Δ𝐀 = -∇χ,$$
where
$$∇ = \left(\frac{∂}{∂x}, \frac{∂}{∂y}, \frac{∂}{∂z}\right),$$
or in component form by $ΔA_μ = -∂_μχ$, where
$$∂_0 = \frac{∂}{∂t}, \hspace 1em \left(∂_1, ∂_2, ∂_3\right) = ∇.$$
Below, we'll also use $𝐫 = (x, y, z)$.
That is also the finite form of the gauge transform, since we could just as well write
$$φ → φ + \frac{∂χ}{∂t}, \hspace 1em 𝐀 → 𝐀- ∇χ,$$
Many different gauges can be set with this. For instance, even $φ = 0$ is possible, just by setting $χ(𝐫,t) = -\int^t_0 φ(𝐫,T) dT$. Then
$$φ(𝐫,t) → φ(𝐫,t) - φ(𝐫,t) = 0, \hspace 1em 𝐀(𝐫,T) → 𝐀(𝐫,T) + \int^t_0 ∇φ(𝐫,T) dT.$$
I'm going to do more than answer your question, and raise the stakes. Suppose we also have another field $q(𝐫,t)$ that participates in this gauge transform with the infinitesimal form of it given by $Δq = χq$. What does the Lagrangian density look like, with it included?
Gauge Invariance And Utiyama's Theorem
Our first question is: what is the most general Lagrangian density $𝔏\left(A_μ, v_{μν}, q, v_μ\right)$ that is a function of the fields $A_μ$, $q$ and their gradients - which I denote here as $v_{μν} = ∂_μA_ν$ and $v_μ = ∂_μq$? Define the following derivatives:
$$𝔉^μ = \frac{∂𝔏}{∂A_μ}, \hspace 1em 𝔉 = \frac{∂𝔏}{∂q}, \hspace 1em 𝔓^{μν} = \frac{∂𝔏}{∂v_{μν}}, \hspace 1em 𝔓^μ = \frac{∂𝔏}{∂v_μ},$$
and assume that $𝔏$ has no dependencies on any other field nor any explicit dependency on the coordinates.
We assume that the gauge transforms are transparent with respect to the gradient,
$$Δv_μ = Δ\left(∂_μq\right) = ∂_μ\left(Δq\right), \hspace 1em
Δv_{μν} = Δ\left(∂_μA_ν\right) = ∂_μ\left(ΔA_ν\right),$$
so that
$$Δv_μ = ∂_μχ q + χ ∂_μq = ∂_μχ q + χ v_μ, \hspace 1em Δv_{μν} = -∂_μ∂_νχ.$$
Then, in infinitesimal form, we have the following action under the gauge transform:
$$\begin{align}
Δ𝔏 &= 𝔉^μ ΔA_μ + 𝔓^{μν} Δv_{μν} + 𝔉 Δq + 𝔓^μ Δv_μ \\
&= -𝔉^μ ∂_μχ - 𝔓^{μν} ∂_μ∂_νχ + 𝔉 χ q + 𝔓^μ \left(∂_μχ q + χ v_μ\right) \\
&= \left(𝔉 q + 𝔓^μ v_μ\right) χ + \left(𝔓^μ q - 𝔉^μ\right) ∂_μχ - 𝔓^{μν} ∂_μ∂_νχ.
\end{align}$$
Now, the first (and most important) key point is that $∂_μ∂_νχ = ∂_ν∂_μχ$. We're assuming the gauge transform functions $χ$ are well-behaved (continuous at least to their second order differentials or $C^2$). Therefore, we can rewrite
$$𝔓^{μν} ∂_μ∂_νχ = \frac{1}{2}\left(𝔓^{μν} + 𝔓^{νμ}\right) ∂_μ∂_νχ.$$
Other than the $C^2$ restriction on $χ$, the function is assumed to be arbitrary and that the gauge transform for them all should be $Δ𝔏 = 0$. Therefore, we may equate the coefficients for each order of differential separately to zero, resulting in:
$$𝔉 q + 𝔓^μ v_μ = 0, \hspace 1em 𝔓^μ q - 𝔉^μ = 0, \hspace 1em 𝔓^{μν} + 𝔓^{νμ} = 0.$$
We may then write:
$$𝔉 = -\frac{𝔉^μ v_μ}{q^2}, \hspace 1em 𝔓^μ = \frac{𝔉^μ}{q}, \hspace 1em 𝔓^{μν} = -𝔓^{νμ}.$$
Thus, the total differential for $𝔏$ (which we'll write as a variational $Δ$, this time understanding that $Δ$ now denotes a generic variation, not just a gauge transform) reduces to:
$$\begin{align}
Δ𝔏 &= 𝔉^μ ΔA_μ + 𝔓^{μν} Δv_{μν} - 𝔉^μ \frac{v_μ Δq}{q^2} + 𝔉^μ \frac{Δv_μ}{q} \\
&= 𝔉^μ \left(ΔA_μ - v_μ \frac{Δq}{q^2} + \frac{Δv_μ}{q}\right) + \frac{1}{2} 𝔓^{μν} \left(Δv_{μν} - Δv_{νμ}\right) \\
&= 𝔉^μ Δ\left(\frac{v_μ}{q} + A_μ\right) + \frac{1}{2} 𝔓^{μν} Δ\left(v_{μν} - v_{νμ}\right),
\end{align}$$
where we used the newly-established anti-symmetry of $𝔓^{μν}$ to write
$$𝔓^{μν} Δv_{μν} = \frac{1}{2} 𝔓^{μν} \left(Δv_{μν} - Δv_{νμ}\right).$$
In this way, we show that the functional dependence of $𝔏\left(A_μ, v_{νμ}, q, v_μ\right)$ on the fields and their gradients reduces to a dependence $𝔏\left(F_{μν}, a_μ\right)$ only on their combinations:
$$F_{μν} ≡ v_{μν} - v_{νμ}, \hspace 1em a_μ ≡ \frac{v_μ}{q} + A_μ,$$
which, expressed in terms of the field and their gradients are:
$$F_{μν} = ∂_μA_ν - ∂_νA_μ, \hspace 1em a_μ = \frac{∂_μq}{q} + A_μ = ∂_μ\ln q + A_μ.$$
This also carries with it the strong suggestion to rewrite $q$, instead, as an exponential.
All of this is an instance of Utiyama's Theorem. First: the gauge fields $A_μ$ may enter the dynamics only in the form of the gauge field strength $F_{μν}$, with no dependence on $A_μ$, other than through their involvement in the gradients of other fields. Second: the gradients for the other fields that are involved in the gauge transform may only occur in certain combinations that involve the gauge field, itself - the "gauge covariant" derivatives. The example chosen would have been more illustrative if using $\ln q$, instead, since its gauge transform is: $Δ\ln q = χ$. Then, it would follow that $Δ\left(∂_μ\ln q\right) = ∂_μ\left(Δ\ln q\right) = ∂_μχ$, and $Δa_μ = 0$. Similarly, we confirm that under gauge transform $ΔF_{μν} = ∂_μ∂_νχ - ∂_ν∂_μχ = 0$. So, this is a gauge covariant derivative applied to the gauge field, itself.
The Utiyama Theorem, in its various incarnations, is the primary structure building tool for Lagrangian densities. That's the most direct answer I can give to your question.
The Emergence Of Maxwell's Equations And The Dynamics
Now that we've established that the only combinations of the gradients of the gauge field that may enter the dynamics, through the Lagrangian, are the anti-symmetric ones, we may then proceed to define the Maxwell field strengths:
$$
𝐁 ≡ \left(B^x, B^y, B^z\right) = \left(F_{23}, F_{31}, F_{12}\right), \hspace 1em 𝐄 ≡ \left(E_x, E_y, E_z\right) = \left(F_{10}, F_{20}, F_{30}\right),$$
respectively for the magnetic induction and electric field.
Then, from the field-potential relations $F_{μν} = ∂_μA_ν - ∂_νA_μ$, we obtain the following:
$$𝐁 = ∇×𝐀, \hspace 1em 𝐄 = -∇φ - \frac{∂𝐀}{∂t}.$$
From this, in turn are derived the identities:
$$∂_μF_{νρ} + ∂_νF_{ρμ} + ∂_ρF_{μν} = 0,$$
which, expressed in terms of the Maxwell vectors, become:
$$∇·𝐁 = 0, \hspace 1em ∇×𝐄 + \frac{∂𝐁}{∂t} = 𝟎.$$
The derivatives with respect to the gauge potentials and field strengths we will now rewrite as:
$$𝔓^{μν} = -𝔊^{μν}, \hspace 1em 𝔉^μ = 𝔍^μ.$$
These are the tensor densities, respectively, for the response fields and sources. Through them, the other Maxwell vectors and scalars arise:
$$\begin{align}
𝐃 &= \left(D^x, D^y, D^z\right) ≡ \left(𝔊^{01}, 𝔊^{02}, 𝔊^{03}\right), & ρ &≡ 𝔍^0,\\
𝐇 &= \left(H_x, H_y, H_z\right) ≡ \left(𝔊^{23}, 𝔊^{31}, 𝔊^{12}\right), & 𝐉 &= \left(J^x, J^y, J^z\right) ≡ \left(𝔍^1, 𝔍^2, 𝔍^3\right),
\end{align}$$
for the displacement field $𝐃$, magnetic force $𝐇$, charge density $ρ$ and current density $𝐉$.
Ignoring the dependency on other fields, integration by parts yields the following as the total variation for the Lagrangian density:
$$\begin{align}
Δ𝔏 &= 𝔍^μ ΔA_μ - \frac{1}{2} 𝔊^{μν} ΔF_{μν} \\
&= 𝔍^μ ΔA_μ + 𝔊^{μν} ∂_νΔA_μ \\
&= \left(𝔍^μ - ∂_ν𝔊^{μν}\right)ΔA_μ + ∂_ν\left(𝔊^{μν} ΔA_μ\right).
\end{align}$$
When applying the action principle, the divergence of the boundary term $𝔊^{μν} ΔA_μ$ drops out (it plays a role in determining the symplectic structure of the field's dynamics), and the remaining term gives rise to the Euler-Lagrange equations:
$$∂_ν𝔊^{μν} = 𝔍^μ.$$
In terms of the Maxwell vectors and scalars, this reduces to the other set of Maxwell equations:
$$∇·𝐃 = ρ, \hspace 1em ∇×𝐇 - \frac{∂𝐃}{∂t} = 𝐉,$$
and derived from this, in turn, is the continuity equation $∂_μ𝔍^μ = 0$, or:
$$∇·𝐉 + \frac{∂ρ}{∂t} = 0.$$
A similar analysis on the other field yields the Euler-Lagrange equation $∂_μ𝔓^μ = 𝔉$ and an additional divergence $∂_μ\left(𝔓^μΔq\right)$, out of which comes the symplectic structure for the additional field $q$.
The significance of their having a non-trivial gauge transform is that this yields a set of constutive laws for the respective derivatives, which includes a contribution to the electromagnetic current:
$$𝔍^μ = 𝔓^μ q, \hspace 1em 𝔉 = -𝔓^μ ∂_μ\ln q.$$
I didn't actually choose a very good example for the extra field, since its Euler-Lagrange equation is essentially just the continuity equation for the electromagnetic source fields, in disguise.
The Lagrangian density doesn't play any direct role in any of what's just been laid out. This is Lagrangian-independent and provides an enveloping framework for all Lagrangian densities that are gauge invariant functions of the fields and their first derivatives.
Instead, the role that the Lagrangian density does play is to provide a set of constitutive relations that connect the fields that arise in dynamics to the fields that the Lagrangian density is a function of. For the Maxwell field, they may be expressed directly as:
$$𝐃 = \frac{∂𝔏}{∂𝐄}, \hspace 1em 𝐇 = -\frac{∂𝔏}{∂𝐁}, \hspace 1em ρ = -\frac{∂𝔏}{∂φ}, \hspace 1em 𝐉 = \frac{∂𝔏}{∂𝐀}.$$
So, $𝔏$ is a generating function for constitutive relations.
There's nothing up to this point that said anything about whether the underlying geometry was relativistic, non-relativistic, or whether it was a geometry where the absolute speed is 0 (the Carrollian universe) or in which all speeds are absolute (the universe of the "static group") or whether there's even any time dimensions at all, as opposed to a universe where all four dimensions are spacelike (i.e. "Euclideanization"). Everything laid out up to this point applies across the board to them all - unchanged.
In particular, there are no $c$'s anywhere, at this point, either express or implied; yet. Instead, that is a matter of geometry.
Invariance Under Geometric Transforms: Constitutive Relations
In fact, there is nothing that said what the coordinates $(t,x,y,z)$ actually had to be. They could be strange mixtures of space and time coordinates, or they could include angular coordinates. All the expressions above - including the component forms - apply as is. The equations have the full set of coordinate transforms as their symmetries. They are covariant with respect to all coordinate transforms.
Since only anti-symmetric combinations of the second derivatives enter into play, then all the fields can be combined into differential forms. This is close to how Maxwell originally represented them in his pre-1870 writings, and in his treatise - except he didn't make (full) use of the anti-commuting Grassmann algebra of differential forms.
We will write wedge products as ordinary products, e.g. $dxdy = dx∧dy = -dy∧dx = -dydx$. Then, define the following:
$$d𝐫 = (dx, dy, dz), \hspace 1em d𝐒 = (dydz, dzdx, dxdy), \hspace 1em dV = dxdydz.$$
Then for the Maxwell fields, we have:
$$A = A_μ dx^μ = 𝐀·d𝐫 - φ dt, \hspace 1em F = \frac{1}{2} F_{μν} dx^μ dx^ν = 𝐁·d𝐒 + 𝐄·d𝐫dt.$$
For the extra field $q$, we may also write $v = v_μ dx^μ$ and $a = a_μ dx^μ$. Then we have
$$v = \frac{dq}{q} = d\ln q, \hspace 1em a = v + A.$$
The fields used in the dynamics are densities, so they contract with the coordinate 4-form
$$d^4x ≡ dx^0 dx^1 dx^2 dx^3 = dt dV$$
as
$$G ≡ \frac{1}{2} 𝔊^{μν} ∂_ν ˩ ∂_μ ˩ d^4x, \hspace 1em J ≡ 𝔍^μ ∂_μ ˩ d^4x.$$
The contraction operator is defined recursively by
$$∂_μ ˩ \left(dx^ν (⋯)\right) = δ^ν_μ (⋯) - dx^ν \left(∂_μ ˩ (⋯)\right), \hspace 1em ∂_μ ˩ g = 0,$$
where $g$ denotes a scalar function. In particular,
$$∂_0 ˩ d^4x = dV, \hspace 1em ∇ ˩ d^4x = -dtd𝐒 = -d𝐒dt.$$
In terms of the Maxwell fields, $G$ and $J$ may be written as:
$$G = 𝐃·d𝐒 - 𝐇·d𝐫dt, \hspace 1em J = ρ dV - 𝐉·d𝐒dt.$$
For the extra field, we can write $p = 𝔓^μ ∂_μ ˩ d^4x$ and $f = 𝔉 d^4 x$.
Then, for the fields and their derivatives, we have:
$$dA = F, \hspace 1em d\ln q + A = a \hspace 1em ⇒ \hspace 1em dF = 0, \hspace 1em da = F.$$
On the dynamics side, we have:
$$dG = J, \hspace 1em dp = f, \hspace 1em ⇒ \hspace 1em dJ = 0, \hspace 1em df ≡ 0.$$
The last of these equations is trivial, since $f$ is a 4-form and all 4-forms in 4D have zero exterior derivative. The constitutive laws obtained up to this point, from gauge invariance are:
$$J = qp, \hspace 1em f = -\frac{dq}{q} p = -(d\ln q) p.$$
All of these objects are geometric invariants. The transform for their components is inherited from the transforms on the coordinates and their differentials under that requirement. So, the second requirement we impose on the Lagrangian density is that it be invariant under a distinguished set of coordinate transforms.
The transforms, specified here in infinitesimal form, should include those for spatial translations $𝝴$, time translations $τ$, rotations $𝞈$ and boosts $𝞄$, with their actions on the coordinates given by:
$$Δ𝐫 = 𝞈×𝐫 - β𝞄t + 𝝴, \hspace 1em Δt = -α𝞄·𝐫 + τ.$$
The boosts are specified in general form with coefficients $(α,β) ≠ (0,0)$ (we're excluding the above-mentioned case of the "static group"). If $αβ ≥ 0$, then the finite forms of a boost in the $x$ direction with a finite velocity $v$ can be specified as:
$$(x, t) → (γ(x - βvt), γ(t - αvx)), \hspace 1em γ = \frac{1}{\sqrt{1 - αβv^2}}.$$
This includes the Galilean transforms if $α = 0$, $β ≠ 0$, where the absolute speed is infinity; the Carrollian transforms if $α ≠ 0$, $β = 0$, where the absolute speed is zero; and the Lorentz transforms $αβ > 0$, with a finite, non-zero absolute speed $c = \sqrt{β/α}$. It also includes 4D Euclidean transforms if $αβ < 0$, except that the finite forms listed above are no longer the most general, since $(x, t) → (-x, -t)$ is also included. For $αβ > 0$, boosts are constrained to $|v| < c$; and in general they are constrained to $αβv^2 < 1$, which (however) is vacuous, except for the Lorentzian case.
Using $Δd = dΔ$, for the coordinate differentials, we may write down the transforms:
$$Δ(d𝐫) = 𝞈×d𝐫 - β𝞄dt, \hspace 1em Δ(dt) = -α𝞄·d𝐫.$$
Imposing the following invariance requirement
$$Δ\left(d𝐫·∇ + dt \frac{∂}{∂t}\right) = 0,$$
we then also have:
$$Δ\left(∇\right) = α𝞄\frac{∂}{∂t}, \hspace 1em Δ\left(\frac{∂}{∂t}\right) = β𝞄·∇.$$
Under these transforms, including the one already specified, the following are the three geometric invariants:
$$d𝐫·∇ + dt \frac{∂}{∂t}, \hspace 1em βdt^2 - α|d𝐫|^2, \hspace 1em β|∇|^2 - α{\left(\frac{∂}{∂t}\right)}^2,$$
and the transforms are exactly those which have these as their invariants.
Finally, for the higher order coordinate differentials, the following may be derived:
$$\begin{align}
Δ(d𝐒) &= 𝞈×d𝐒 + β𝞄×d𝐫dt, & Δ(d𝐫dt) &= 𝞈×d𝐫dt - α𝞄×d𝐒, \\
Δ(dV) &= -β𝞄d𝐒dt, & Δ(d𝐒dt) &= 𝞈×d𝐒dt - α𝞄dV.
\end{align}$$
So, imposing the requirements $ΔA = 0$, $ΔF = 0$, $ΔG = 0$ and $ΔJ = 0$ leads to the following transforms:
$$
Δφ = -β𝞄·𝐀, \hspace 1em Δ𝐀 = 𝞈×𝐀 - α𝞄φ, \hspace 1em Δ𝐁 = 𝞈×𝐁 - α𝞄×𝐄, \hspace 1em Δ𝐄 = 𝞈×𝐄 + β𝞄×𝐁, \\
Δρ = -α𝞄·𝐉, \hspace 1em Δ𝐉 = 𝞈×𝐉 - β𝞄ρ, \hspace 1em Δ𝐃 = 𝞈×𝐃 + α𝞄×𝐇, \hspace 1em Δ𝐇 = 𝞈×𝐇 - β𝞄×𝐃.
$$
For the other field, a set of transforms similar to those for $A$ and $J$ can be derived, respectively for $a$ and $p$, while the scalar $q$ and 4-form $f$ are both invariant.
Translation invariance is trivial, since everything is expressed in terms of differential forms. There are no occurrences of $𝝴$ or $τ$ anywhere above. Invariance under rotations is ensured by restricting to only the scalars and scalar combinations of the vectors. For the electromagnetic fields, gauge invariance ensures that only $𝐁$ and $𝐄$ may enter directly into the Lagrangian density. Their only independent scalar combinations are:
$$½|𝐁|^2, \hspace 1em 𝐁·𝐄, \hspace 1em ½|𝐄|^2.$$
Therefore, the Lagrangian density reduces to a function of the form
$$𝔏\left(½|𝐁|^2, 𝐁·𝐄, ½|𝐄|^2, ⋯\right).$$
Other scalar invariants in $(⋯)$ exist for the components of the field $a$, similar to those for $𝐀$ and $φ$ (which are $½|𝐀|^2$ and $φ$ itself), as well as those involving mixtures of the extra field with the electromagnetic field. Here, we will just focus on the first three.
Write their differential coefficients as:
$$Δ𝔏 = ε Δ\left(½|𝐄|^2\right) + θ Δ\left(𝐄·𝐁\right) - \frac{1}{μ} Δ\left(½|𝐁|^2\right) + ⋯$$
Then, this leads immediately to the following constitutive laws:
$$𝐃 = ε 𝐄 + θ 𝐁 + ⋯, \hspace 1em 𝐇 = \frac{𝐁}{μ} - θ 𝐄 + ⋯, \hspace 1em ⋯,$$
with this for adopted for backward-compatibility (which, however, tacitly assumes that $𝔏$ has a non-zero derivative with respect to $½|𝐁|^2$; i.e. that $μ ≠ 0$).
This is, thus, the general form for Lagrangian densities that are translation-invariant and isotropic.
A Lagrangian density reduces to a function of a set of invariant combinations. The differential coefficients with respect to those invariants together comprise the corresponding constitutive coefficients. Each of them is, in general, a function of all the invariants, satisfying relations such as
$$\frac{∂ε}{∂\left(𝐁·𝐄\right)} = \frac{∂θ}{∂\left(½|𝐄|^2\right)}.$$
The Lagrangian density, therefore, generates a set of constitutive relations that are all cut from the same cloth. The only Lagrangian-dependent differences are those encapsulated within the constitutive coefficients. All of the particulars of the dynamics are contained in them.
There is mixing between the first and third of the scalar invariants, under boosts, and the only invariant combination obtained from the two is:
$$½\left(β|𝐁|^2 - α|𝐄|^2\right).$$
So, when we conclude boost invariant, the Lagrangian density reduces further to a function of the form
$$𝔏\left(½\left(β|𝐁|^2 - α|𝐄|^2\right), 𝐁·𝐄, ⋯\right).$$
This leads to relations between the constitutive coefficients; with the one of importance here being:
$$βεμ = α.$$
Thus, for boost-invariant Lagrangian densities, we can say the following: (1) in the Galilean case, $εμ = 0$ (so at least one of $𝐃$ or $𝐁$ must be $𝟎$), in the Carrollian case, we would require $εμ = ∞$ (thus forcing at least one of $𝐄$ or $𝐇$ to be $𝟎$). In the 4D Euclidean case, we have $εμ < 0$, while in the Lorentzian case, we have $εμ = α/β = 1/c^2$.
For null fields
$$β|𝐁|^2 = α|𝐄|^2, \hspace 1em 𝐁·𝐄 = 0,$$
the constitutive coefficients reduce to the "null field form": $ε = ε_0$, $μ = μ_0$, $θ = θ_0$, which may each be functions of the other invariants not listed. If $θ_0$ is independent of the other invariants, and constant, then without loss of generality we can set $θ_0 = 0$ by just redefining
$𝐃$ and $𝐇$ respectively as $𝐃 - θ_0𝐁$ and $𝐇 + θ_0 𝐄$. This will not affect the Maxwell equations. For the Lorentzian case, we can also assume that $ε_0 > 0$ and $μ_0 > 0$ by flipping signs, changing $𝐃$, $𝐇$, $𝐉$ and $ρ$ respectively to $-𝐃$, $-𝐇$, $-𝐉$ and $-ρ$.
In that case, the constitutive relations reduce to the familiar form
$$𝐃 = ε_0 𝐄 + ⋯, \hspace 1em 𝐇 = \frac{𝐁}{μ_0} + ⋯,$$
where focus is taken off the possible additions from other fields, with $ε_0 > 0$, $μ_0 > 0$ and $ε_0 μ_0 = (1/c)^2$.
By comparison, the Maxwell-Lorentz density has the form
$$𝔏 = ½ \left(ε_0 |𝐄|^2 - \frac{|𝐁|^2}{μ_0}\right).$$
In large measure, the constitutive law obtained from it is independent of the Lagrangian density, since it is already present in the other Lagrangian densities - at least for null fields or fields closely approximating them. Only the cross-terms arising from invariants that mixed the electromagnetic fields with other fields will have an impact on that conclusion.
This undercuts much of the justification for the Maxwell-Lorentz Lagrangian density, as opposed to other alternatives.