Second order evolution equations from a variational problem? I'm not an expert in calculus of variations but suppose you have
$$
E = \int_{\Omega} \mathcal{L}(x,y,y')d\Omega
$$
The gradient of such function is given by
$$
\nabla E = \frac{\partial \mathcal L}{\partial \mathcal y} - \frac{d}{dx}\frac{\partial \mathcal L}{\partial \mathcal y'}
$$
According to some references there'are conditions under which the evolution equation constructed as
$$
\frac{\partial y}{\partial t} = - \nabla E
$$
has solution, convergent when $t \to \infty$. Suppose however $E$ is for example some physical energy function, then we can derive motion equations like
$$
m \frac{\partial^2 y}{\partial t^2} = -\nabla E
$$
The reference for the first order is:
https://books.google.co.uk/books?id=iLRtCQAAQBAJ&pg=PA3&dq=continuous+gradient+descent&hl=en&sa=X&ved=0ahUKEwjesr3Ev_TcAhVBJcAKHYMmBnUQ6AEIOTAD#v=onepage&q=continuous%20gradient%20descent&f=false
For the second order any text on classical mechanics. Now I have a mathematical question about these two:
Are there condition on the functional that will allow to state "Ok, the evolution is given by a first/second order derivative respect to time"?
Is there like a theory explaining how to construct these evolution equations given a certain functional to minimize?
 A: The answer to this question depends fundamentally on what $\Omega$ is; in variational dynamics, the function $\mathcal{L}$ is integrated over time $t$ ($\Omega = t$), so I'll focus only on that case.
In such a situation, you'll find that the calculus of variations forces the function $\mathcal{L}(t,y,y')$ that minimizes the functional
$$J[y] = \int_a^b \mathcal{L}(t,y,y') dt$$
on a fixed interval $[a,b]$ to satisfy the Euler-Lagrange (evolution) equations:
$$\frac{\partial\mathcal{L}(t,y,y')}{\partial y} - \frac{d}{dt}\frac{\partial\mathcal{L}(t,y,y')}{\partial y'} = 0$$
It should then be clear that the order of the temporal derivatives that pop up in these evolution equations are dependent on the form of $\mathcal{L}$ itself. It is hard to describe some general rules for the maximum order of temporal derivatives you get in these equations, as you can sometimes integrate these equations in time and "kill off" an order, but hopefully this furnishes a method for which you can obtain the maximum order of temporal derivatives for specific forms of $\mathcal{L}$. You can read about this result and extensions of it in this book.
For concrete examples, consider $\mathcal{L}(t,y,y') = \frac{1}{2}my'^2 - V(y)$. Inserting into the equations above, you'll find that the Euler-Lagrange equations become
$$m\frac{d^2 y}{dt^2} + \frac{\partial V}{\partial y} = 0$$
which is just Newton's second law. Note the second-order time derivative.
In the absence of a potential $V(y)$, then $\mathcal{L}(t,y,y') = \frac{1}{2}my'^2$, $m\frac{d^2 y}{dt^2} = 0$, and we can simply integrate out the second derivative to get 
$$m\frac{dy}{dt} = C$$
for some constant $C$, which corresponds to conservation of momentum.
