Hi, no the base engine can't do that neither the event system which can only give xp. Surely if know C# you could add it the spell editor consuming like hp/mp. Though adding this feature would require for you to see how to implant it; if the player's current xp is less than the requirement should the player be casting the spell for a level cost or not.
Else an other way would be by changing the 'give xp' option to 'change xp' (which from my point of vu should already been made). Thought this would also mean if the player loose a level or not.