I claim that the function $E_S$ is lower semi-continuous, meaning that for any sequence $x_k \in M$ converging to some $x \in M$, $\lim_{k \to \infty} E_S(x_k) \geq E_S(x)$.
We want to show that the complement of $M_S$ has empty interior. Points $x$ in this complement are characterized by the fact that there exists a sequence of points $(x_k)_k$ converging to $x$ which is not eventually constant.
Assume by contradiction that there exists an open subset $U$ contained in $\overline{M_S}$.
Let $n = \max_{y \in U} E_S(y)$ (this max is finite because $E_S(y) \leq \dim(M)$. As $E_S$ is lower semi-continuous, the set $V = E_S^{-1}(n) \cap U = E_S^{-1}(n-1, \infty) \cap U$ is open and non-empty.
But all points in $V$ belong to $M_S$ as the number of distinct eigenvalues of $S$ is constant on $V$ and $V$ is open. This contradicts the fact that $\overline{M_S}$ has non-empty interior.
Let us now return to the lower semi-continuity of $E_S$. I guess this is more or less standard stuff. A nice way to see it is via Rouché's theorem.
Let me work in a coordinate chart.
Assume given a point $x_0 \in M$ and let $n_0 = E_S(x_0)$. Let $\lambda_1, \ldots, \lambda_{n_0}$ be the distinct eigenvalues of $S$ at $x_0$. You can consider small disjoint intervals $I_k$ centered at the eigenvalues and view them as the restriction to $\mathbb{R}$ of balls $B_1, \ldots B_k$ in the complex plane.
If $x$ is close enough to $x_0$, the characteristic polynomial $\chi_{S(x)}$ of $S$ at $x$ will be close (in the sup-norm over some large compact set encompassing all the balls) to $\chi_{S(x_0)}$. Hence, the number of eigenvalues in each ball $B_i$ fox $S(x)$ (counted with multiplicity) will be the same as for $S(x_0)$.
This means that locally, distinct eigenvalues cannot merge, i.e. $E_S(x) \geq E_S(x_0)$ for $x$ close enough to $x_0$.
Rouché's theorem is a very nice tool to prove continuity of the eigenvalues even assuming multiplicity. What you also see is that multiplicity of each of the eigenvalues are locally constant on $M_S$.
To prove differentiability of an eigenvalue $\lambda = \lambda(x)$ with multiplicity $k \geq 1$, the easiest way is to remark that the derivatives of the characteristic polynomial satisfy $\chi_{S(x)}^{(k-1)}(\lambda) = 0$ while $\chi_{S(x)}^{(k)}(\lambda) \neq 0$. So you can just apply the implicit function theorem to $(x, \lambda) \mapsto \chi_{S(x)}^{(k-1)}(\lambda)$.
Let me know if you need a more detailed answer.