Z* effective charge and Ionization Energy
Using the common idiom: "full subshells are stable"

It is a little more compact to use the incorrect explanation and correct it than to explain in terms of correct. Also, when you hear this incorrect explanation, you will understand what is meant.

Yes, size is a factor (thus the "up" part- IE is higher in lower periods), but the observed anomaly in second-ionization energies in $\ce{Na}$ and $\ce{Al}$ is better related to removal of an electron from a full subshell.

$\ce{Na}$ has an electron configuration of $\ce{[Ne] 3s^1}.$ The first ionization gives $\ce{Na}$ makes it $\ce{[Ne]}$, the same as a noble gas- full 2p subshell. Because full subshells are stable, it takes a lot of energy to remove the first electron from it. $\ce{Al}$ is analogous; the second ionization means removing an electron from a full subshell.

The same is observed in the first ionization energies (in $kJ/mol$):
$$\ce{Na}:495$$$$\ce{Mg}:737$$$$\ce{Al}:577$$
Ionization of $\ce{Mg}$ removes an electron from a full $\ce{3s}$ subshell, so it is a little higher than the trend.

There are many factors that contribute to exact values, but these are difficult to predict, which is why they taught a simple version in your class.

Correcting the myth

While it is common to refer to full subshells as being more stable, it isn't really what is going on. In reality, the next electron added in destabilized. This occurs because of shielding. Outer electrons feel repulsion from inner electrons, thus outer electrons are easier to remove than inner ones. The saying that "half-filled subshells are stable" is also used. Again, it is that the next added electron is destabilized, but in this case it is because the energy needed to spin pair the two electrons.