Take the template at 17? Then you already have the 9th level spells. Play Dread Necromancer instead, and become a Lich with Phylactery automagically at 20, no cost on phylactery. Play a Scarred Land Crypt Lord, they become Lich at level 10 of PrC for no LA.
Lots of Options