I would argue that there is no general definition. The reason we study weak solutions is largely because:
We can prove existence and uniqueness for a given equation in a suitably generalised sense.
Solutions to a given equation are known to have singularities in general, so we need a way to talk about such singular solutions.
See this MSE post for a relevant discussion (albeit for a slightly different question). In general the definition of a weak solution is usually crafted for the specific equation, and the "right" notion differs based on the problem. Not that uniqueness is just as important as existence here; a theory of weak solutions is arguably useless if one also obtains highly singular or "non-physical" solutions.
With this in mind, consider the following problems and their weak formulations. As you will see, each problem requires a different notion of a "generalised solution," and thus there cannot possibly be a all-encompassing theory that covers all of these cases in a satisfactory way.
Example 1 (Second order linear divergence-form elliptic PDEs): A standard setup for elliptic equations involves
$$ Lu = - \mathrm{div}(A(x) \nabla u ) = f, $$
where we can talk about weak solutions $u \in W^{1,2}(\Omega)$ satisfying
$$ \int_{\Omega} A(x) \nabla u \cdot \nabla \varphi \,\mathrm{d}x = \int_{\Omega} f \varphi \,\mathrm{d}x $$
for all test functions $\varphi \in W^{1,2}_0(\Omega)$.
Notice that, despite being a second order equation ($Lu$ involves second derivatives), due to the divergence-form structure we can put a derivative on the test function, thereby only requiring $W^{1,2}$ regularity for our weak solution. You could alternatively define a notion of a weak solution where $u \in W^{2,2}(\Omega)$ satisfies $Lu = f$ almost everywhere (which you may be tempted to do in search of a general framework), but it turns out that it's difficult to prove existence in this case, and for irregular domains there may be no such $W^{2,2}$ solution.
Example 2 (Conservation laws): For a scalar conservation law
$$ \partial_tu + \partial_x F(u) = 0 $$
with a given nonlinearity $F$ (e.g. $F(u) = \frac12 u^2$ gives Burgers' equation), we know that solutions may develop singularities in finite time, even if we start with smooth initial data. Here by integrating by parts, we obtain the weak formulation
$$ \int_{\mathbb R \times (0,T)} u \,\partial_t \varphi + F(u) \partial_x\varphi \,\mathrm{d}x = 0 $$
for all test functions $\varphi \in C^{\infty}_c(\mathbb R \times (0,T))$. This definition makes sense assuming merely that $u \in L^{\infty}$, and if $u$ is piecewise $C^1$ then we obtain the so-called Rankine–Hugoniot conditions along the discontinuity curves.
However, it is also known that such a formulation is insufficient as it leads to non-uniqueness; details can be found in Section 3.4 of Evans's text, but there may exist multiple "generalised" solutions to a given initial value problem. We would expect there is a unique "physical" solution however, so one needs to impose further conditions such as an entropy conditions to single out the correct one.
This illustrates an important point regarding weak solutions; they should not be so general that we loose uniqueness and get "non-physical" solutions. Moreover, the additional conditions we need to impose are motivated by physical grounds.
Example 3 (Harmonic maps): Consider the variational problem of finding a map $u : B^n \to \mathbb S^{n-1}$ (here $B^n \subset \mathbb R^n$ is the unit ball and $\mathbb S^{n-1} \subset \mathbb R^n$ is the unit sphere) which minimises the energy
$$ D(u) = \int_{B^n} \lvert \nabla u \rvert^2 \,\mathrm{d}x.$$
A critical point of this functional satisfies the harmonic map equation
$$ - \Delta u = \lvert\nabla u \rvert^2u, $$
where is the associated Euler-Lagrange equation to the associated variational problem. Here we can study the PDE itself, but the variational formulation is convenient to prove existence by finding a minimiser of the above functional (Dirichlet's principle). For this particular equation it is known that singularities can develop if $n \geq 3$, so one often studies energy minimising harmonic maps. Note that non-uniqueness in itself is not as large of a concern here, as general critical points may also be of geometric interest.
There is a notion of being weakly harmonic however, namely that $u \in W^{1,2}(B^n;\mathbb S^{n-1})$ satisfies
$$ \int_{B^n} \nabla u \cdot \nabla \varphi + \lvert\nabla u \rvert^2 u\varphi
\,\mathrm{d}x $$
for all test functions $\varphi$. However, for $n=3$ there is a result of Rivière which shows that there is not only non-uniqueness, but the solutions constructed are moreover everywhere discontinuous (in contrast to minimisers whose singular set can be shown to be small). Thus this formulation is regarded as being "too weak," and hence one usually imposes further conditions like stationarity or minimality.
Example 4 (Monge-Ampere): A more exotic example is the fully nonlinear equation
$$ \det \nabla^2 u = f. $$
There is the notion of Alexandrov solution, where for a convex function $u \colon \Omega \to \mathbb R$ one defines
$$ \mu_u(E) = \mathcal L^n(\partial u(E)) $$
for any $E \subset \Omega$ Borel, where $\partial u$ denotes the convex subdifferential.
The motivation comes from the fact that, if we have $u \in C^2(\Omega)$ is convex, then by the area formula we have
$$ \mu_u(E) = \int_E \det \nabla^2 u \,\mathrm{d}x. $$
Then a weak solution in the Alexandrov sense is a convex function $u$ satisfying $\mu_u(E) = \int_E f \,\mathrm{d}x$ for all Borel sets $E \subset \Omega$.
Here one really exploits the specific determinant structure in the equation, and it turns out that this suffices to develop a well-posedness theory.
(Note: I'm not a specialist on this topic, so this is just a surface-level outline of one approach.)
There are also many other examples one can discuss, such as distributional solutions, Leray solutions and "strong solutions" to the Navier–Stokes equations, viscosity solutions, etc, but hopefully this illustrates my point. While they may be attempts to define a general abstract framework for weak solutions, I would guess they cannot simultaneously treat all of the above examples in a satisfactory way.
Finally, I would end with the following quote from Evans's book (page 3, 2nd edition), which I think is relevant:
There is no general theory known concerning the solvability of all partial
differential equations. Such a theory is extremely unlikely to exist, given
the rich variety of physical, geometric, and probabilistic phenomena which
can be modeled by PDE. Instead, research focuses on various particular
partial differential equations that are important for applications within and
outside of mathematics, with the hope that insight from the origins of these
PDE can give clues as to their solutions.
See also this MO post. While this concerns the theory of PDEs as a whole, the same applies to weak solutions in particular.