Yes, you gain experience by healing allies and NPC's. But it has to be effective : the target must regain life through the process. You can spam healing on a full life guard in a city but you will not have any exp. It's not like illusion.
By the way, if you consider playing support for your Huscarl or any ally, you could imagine illusion and restoration will be great. It could have been if we were able to choose their behaviour (in front line/behind, range/close combat, passive/aggressive,...) and equipement. But it's just painfull. Even allies with heavy armor use the bow (which is invisible in their inventory). They seam never engage the fight unless you go through dialogue and ask "shoot this one". And if you engage, you remain the target for a while.