A few things come to mind besides what Miles suggested, and yes they are very basic, but just double-check
1. Make sure the NPC is of the correct Class. Not all Classes can sell spells. (They need to be a Service-type Class, like Mage Service, or Healer Service... I think this is true, right?)
2. Drag and drop the Spell into their "Spells" list, not their "Items" list.
3. Make sure you have checked the Spells box in the Buy/Sell AI window.
4. If it's with a Save game file, make sure the Save is Updated/Repaired with Mash.