The numbers after the spell's name indicate the character's total level to learn the spell. The total level includes 20 levels gained before promotion. Even if you promoted after level 20 the game assumes there were only 20 levels gained before promotion, and the numbers shown below are not affected. For example, if you were to level Karna up to 40 before promoting her, she would learn Blast 4 at level 37. If you had promoted her before she reached level 37 she would not learn the spell until level 17 after promotion - the game assumes she only gained 20 levels before promotion (37 - 20 = 17!).
"--" indicates the spell does not reach that level.