ALL current and future HD become d12, so class level HD become d12.
As far as your comment "I know that normally hit dice are not changed when adding a template" that is the general rule but every template I am familiar with states what it changes. In this case ALL HD become d12, in other cases it only references racial HD or no change at all. But whenever going with templates not changing HD, this is not universally true.
Also, if you are wondering why this breaks from the general rule of template not messing with your class HD as well as racial - ghost are undead and you no longer have a CON score so they try and give you some form of not dying.
Please note, you don't have a CON score (listed as -- not 0) but you do get a +4 to CHA and CHA often increases HP or is used in place of CON score for undead. I haven't reread the entire ghost description to see if this is true for you. I suggest you take a thorough look at the full ghost description and make sure you understand everything when converting. If you have any other questions feel free to post.