By (1), the numbers are either have only 1 and 2 or 4 and 5 as digits.
More precisely, if $n=2k$ is even, then $N=c\cdot \frac{10^n-1}{99}$ with $c\in\{12,21,45,54\}$. Since the $c$ are not divisible by 11, $N$ is divisible by 11 only if $10^n\equiv 1\pmod {121}$, i.e. $n$ is a multiple of 22. In that case $m(S)= \frac{12+21+45+54}4\cdot \frac{10^n-1}{99} = \frac{10^n-1}3.$ However, if $n$ is not a multiple of 22, then $S$ is empty and $m(S)$ is undefined.
And if $n=2k+1$ is odd, then $\tag1N=10c\cdot \frac{10^{2k}-1}{99}+d$ with $c\in\{12,21,45,54\}$ and $d=c\bmod 10$. A quick check shows that $\frac{10^{2k}-1}{99}\equiv k\pmod{11}$. Hence we are looking for solutions of $d\equiv kc\pmod{11}$. This leads to $ k\equiv \begin{cases}2&c=12\\10&c=21\\5&c=45\\7&c=54\end{cases}$ We conclude that $S$ contains only one numer $N$, given by $(1)$, if $k\equiv 2, 5, 7, 10\pmod {11}$; then $m(S)$ is also this $N$. In all other cases, $m(S)$ is undefined.
Here's a quick proof that $\frac{10^{2k}-1}{99}\equiv k\pmod{11}$: Let $a_k=\frac{10^{2k}-1}{99}$. The statement is clearly true for $k=0$, i.e. $a_k=0$. The rest follows by induction from $a_{k+1}=100a_k+1\equiv a_k+1\equiv k+1\pmod {11}$.