This might be a bit of a soft question, but does anyone know if it is possible to construct an optimal control problem with an uncountably many state equations with each state equation describing the evolution of a different state variable. Something like minimizing a cost functional w.r.t. to the following ODE
$$ \dot{x}_i(t) = g_i(x_i,t) \forall i \in [0, n] $$
Your dynamics do not have a control input, so I am not sure what you mean with optimal control here.
It is possible to construct an optimal control problem with any number of state equations. It is even possible to solve it. Use
$$ \dot{x}_i = -x_i + u_i $$
and as cost index
$$ J = \int_0^{\infty} \Big( \sum_{i = 1}^n x_i^2 + u_i^2 \Big) dt $$
for $i = 1, \dots, n$. The optimal controller is $u_i = -K x_i$ and $K = \sqrt{2} - 1$. This works for any number of state equations $n$.
Of course it won't be always that easy but that depends on the problem.