After some thought, I think that the idea of indirect damage is still a great idea for many spells. For example, pushing a monster off of a cliff. There's a rather ingenious way to do this that I remember from the old Action Quake II mod. Basically when you hit a monster with a push or pull effect, it could get an attacker value and a timeout of about a second. How this would work is that if the monster takes environment damage (such as falling damage) during that timeout the attacker that was recorded gets the XP. That would work if a monster was pushed into lava, pushed onto fire, pushed into a boulder.
While on the subject of indirect damage, Poison doesn't give XP in the original game and I think it was done really well. Poison weapons and poison spells are essentially the most powerful abilities in the game. For example, the poison bolt will grant some XP for the initial hit, but the periodic poison damage does not grant XP. But that periodic damage does a LOT of damage over time and it stacks. So a warlock's best strategy in a lot of fights is to blast a ton of poison, run away and charge up, then blast a bunch more. Same with a rogue and a poison dagger or the sickener. There are only a handful of serious threats that are immune to poison so this strategy can defeat danger, but it stunts XP. Which I think is a brilliant trade off.
As for the indirect XP from utility spells. I chewed over some options, and I think that there is a good middle ground without making a super abstract XP system. The XP award would have to be per spell type. Low level spells would give nothing or very small amounts. Most enchantments would give no XP because they are designed to make melee combat easier, and that carries with it its own XP reward. Spells like dispell magic and earthbind would give a reasonable amount.
The question for me at that point is whether stuff like fly, life water, and gaseous form should grant XP. They are not necessarily meant to help with combat, and they are relatively powerful spells. So it seems like they should have an award associated with them.
Just to keep in mind, pwmod has two major XP differences to the original game. The big one is that dying (after level 1) reduces your XP by a lot. The other is that since there are more sources of XP, and the base XP was increased for many activities, the players level marginally faster. So any of these improvements increases that margin slightly.