This should probably be read in conjunction with part 1 of the Spells spoiler.
You get an enormous penalty if you fail to satisfy the following inequality
6S + X/3 >= 4L - 5
where S is your skill in the spell's school - 0, 1, 2 or 3 for unskilled, basic, skilled and expert respectively - X is your experience level, and L is the spell's level. The penalty is large enough that the spell is all but unusable if you fail to satisfy the inequality*
For each spell level and skill, we can calculate the minimum experience level you have to be to cast (omitted if above 30 or below 1):
Useful inferences can be made from this table and knowing the level and school of each spell.
- Almost anybody who can cast spells, can cast a level 3 spell when their skill is basic. Now consider enchantment spells: the highest level enchantment spell is Charm Monster, which is level 3. Therefore it's a complete waste of skill slots for a wizard to enhance enchantment spells.
- Similarly there's little point in taking healing spells past basic. (Hint: Restore Ability, and indeed most of the healing spells other than the ones that actually give out hit points, are rather useless once you have a unicorn horn.)
- And indeed, the high-level cleric spells are somewhat useless as well, so there's not so much point in enhancing them. Turn undead - why bring monsters back to life? Unless they're your pets and you're relying on them, I guess. So, that's pacifists then. Create familiar is interesting in the late game, as if you are high enough level it can create tame archons. But mostly it just creates cats and dogs.
- A post-quest (level 14) wizard, can gain just one more level, and then can cast everything up to and including level 4 spells just fine (and you can't really be a wizard and rely entirely on spells until you're post-quest...)
- Level 5 spells pretty much require training to skilled. It's very much worth doing this for divination, as not only can you cast magic mapping but detect monsters is quite a bit more useful.
- To cast a level 6 spell you don't have to be expert - you can get away with skilled, and be level 21. This will save skill slots. Teleport away is an amazingly useful spell, don't underestimate it. Dig and polymorph are also worth having if you can be bothered to spam knock and lock until you can enhance matter spells to skilled. (However, you might like to consider enhancing escape to expert, because then you can jump further)
- You pretty much have to be post-quest and expert to cast a level 7 spell. This pretty much rules out cancellation, as all the useful matter spells are high-level so they're hard to exercise. The other level 7 spell - finger of death - is easier to get as you can get it by being crowned, and easier to exercise yourself up to expert, especially once you have the Eye and start relying on magic missile.
* Of course if you lack sufficiently high spellcasting intelligence, or are wearing too much metal armour, you're not going to be able to cast anyway; or you might be wearing a spellcaster's robe, which improves your chances. I have not taken any of that into account, most of this is written from the point of view of a post-quest wizard, which was the stage I was at when I worked all this stuff out.