Definition of generalized 4-momentum In nonrelativistic mechanics, given a lagrangian $L$, we define the action as 
$$S[q]=\int L(q(t),\dot q(t))dt\tag{1}$$
and we can prove (see, for example, this answer for eq. (2))
$$\begin{align}
\frac {\partial L} {\partial \dot q^i} &= \frac {\partial S} {\partial q^i} \tag{2} \\
\dot q^i \frac {\partial L} {\partial \dot q^i} -L&= -\frac {\partial S} {\partial t}\tag{3}
\end{align}
$$
so we call quantity (2) generalized momentum (covariant components) and  quantity (3) energy of the particle.
In special relativity (signature $(+,-,-,-)$) the definition of 4-momentum I know from lesson is $$p_\mu = -\frac {\partial S} {\partial q^\mu}=\left (-\frac 1 c \frac {\partial S} {\partial t} , - \frac {\partial S} {\partial q^i}\right). \tag{4}$$
The spatial part of this 4-vector seems to be the opposite of the nonrelativistic generalized momentum, and this results in the equation $$p_\mu = \left (\frac E c, -p_i \right).\tag{5}$$
Both my professor and Landau-Lifshitz get rid of this extra minus sign, by saying that raising a spatial index changes sign, and covariant and contravariant components in nonrelativistic euclidean metric are equal, so we can write
$$p^\mu = \left (\frac E c, p^i \right). \tag{6}$$
However, this reasoning seems flawed to me, because, in my understanding, the classical equations work with any metric, so they would work even with the metric $g_{ij} = -\delta_{ij}$, which is the one we use when we see $\mathbb R ^3$ as subspace of $\mathbb R ^{1,3}$. In other words, it seems to me that they are just arbitrarily exchanging the covariant and contravariant components of the vector. How can we make this more rigorous?

Clarifying the question by some comments I've made
It is clear that we want to achieve for the free particle
$$p^\mu = mcu^\mu = \gamma m(c, v^i) = - \frac {\partial S} {\partial x_\mu}.\tag{7}$$
But in terms of the nonrelativistic momentum 
$$p_{nr}^i = \frac {\partial S} {\partial x_i},\tag{8}$$ we have
$$p^\mu = (E,-p_{nr}^i).\tag{9}$$
So this means in the non relativistic limit 
$$p^i = mv^i = -p_{nr}^i,\tag{10}$$ 
but I thought 
$$p_{nr}^i = mv^i.\tag{11}$$ 
Where's my error?
 A: You talk about "the classical equations," by which I assume you mean the nonrelativistic equations. ("Classical" is used in contradistinction to quantum-mechanical.) But in nonrelativistic physics, we have separate conservation of energy and momentum, and there is no such thing as an energy-momentum four-vector. Energy and momentum are just separate objects.
I guess you can define a Galilean four-vector as something that transforms the same was as a displacement in Galilean spacetime, but then $(E,\textbf{p})$ does not transform as a Galilean four-vector. Galilean four-vectors are also not of much interest because there is no physically interesting inner product on such a vector space. Galilean geometry has two separate and unrelated systems of measurement, one for time and one for space.
So in Newtonian mechanics, you can take your two conserved quantities to be $c_1E$ and $c_2\textbf{p}$, where $c_1$ and $c_2$ can be chosen to be any two real numbers with any signs. These choices are independent, because there is no concept of putting them together into one object that transforms in a well-defined way.

However, this reasoning seems flawed to me, because, in my understanding, the classical equations work with any metric, so they would work even with the metric $g_{ij} = -\delta_{ij}$, which is the one we use when we see $\mathbb R ^3$ as subspace of $\mathbb R ^{1,3}$.

Even that would be only if you choose the $+---$ signature. You could just as easily use $-+++$ (and most relativists do).
A: Okay, I got it. (Hoping to be refuted if this is wrong.) Everything works out; eq. (11) was my misconception, due to being used to the flat euclidean metric.
With pedantic Einstein convention to make index posisioning consistent, in nonrelativistic mechanics we have
$$
\begin{align}
L&= \frac 1 2 m \sum _i (v^i)^2 = \frac 1 2 m \delta_{ij}v^i v^j\tag{1'}\\
\frac {\partial L} {\partial v^i}&=m\delta_{ij}v^j=m\delta _{ij} g^{jk} v_k\tag{2'}
\end{align}
$$
So, with the definition
$$p_i = \frac {\partial L} {\partial v^i}\tag{3'}$$eq. (11) is wrong, as with the metric $g_{ij}=-\delta_{ij}$ it should be $p^i=-mv^i$. In general, the covariant components of the momentum are proportional to the contravariant components of the velocity, so we either need the metric to move an index (and let the momentum depend on the metric, so that in general $p^i\neq mv^i$), or define
$$p_h=g_{hn}\delta^{ni}\frac {\partial L} {\partial v^i}=\sum_i g_{hi}\frac {\partial L} {\partial v^i}\tag{4'}$$
so that
$$g_{hn}\delta^{ni}\delta_{ij}g^{jk}=\delta^k_h\tag{5'}$$
and
$$p_h = g_{hn}\delta^{ni}\frac {\partial L} {\partial v^i}=mv_h\tag{6'}$$
independently of the metric.
So I don't know if (3') or (4') is the correct definition for nonrelativistic mechanics, but it seems that (4') is the one used in relativity. In the $(\pm,\mp,\mp,\mp)$ convention, (4') gives
$$p_\mu=\mp\frac {\partial L} {\partial \dot x^\mu}\tag{7'}$$ so that in the nonrelativistic limit (6') holds. (A posteriori, if (4') is commonly used in relativity, probably (4') is the one used in nonrelativistic mechanics, too, so that there is uniformity).
PS: I should note that by defining nonrelativistic energy $$E=v^i \frac {\partial L} {\partial v^i}-L\tag{8'}$$ everything works out independently of the definition of momentum. Relativistic energy, instead, is defined by the time component of (7').
PPS: OP is stated in terms of action, while this answer is in terms of the lagrangian; obviously, since (2) holds in any number of dimensions and in any metric, everything in this answer can be easily expressed in terms of the derivatives of the action instead of the lagrangian.
