Electron Configuration of an element with no. of electrons > 18

Let's say that we have an element, say $\ce{Ca}$. According to law, the last shell should contain only upto 8 e-. Hence, electronic configuration of $\ce{Ca}$ would be 2,8,8,2.

But, according to the 2n2 rule, the M-shell can hold upto 18 e-. So, doesn't this mean that the e- configuration of $\ce{Ca}$ can also be written as 2,8,9,1 or say, 2,8,7,3 or something?

But it's not so... Why?