Your question seems to focus on the last part - that after the transformation, you are treated as an undead for the purposes of certain spells, but not for other effects that specifically target undead.
And what you want to know is whether, if a lich casts this spell, does he now not get treated as an undead for the purposes of spells like searing light?
There are two ways to read this effect:
- The spell changes your type to undead with respect to detect undead, channeled energy, cure spells, and inflict spells. It does not change your type for other effects, such as searing light (so, you keep whatever type you had previously).
- The spell changes your type to undead with respect to detect undead, channeled energy, cure spells, and inflict spells. It changes your type to "not undead" for other effects, such as searing light.
I think the first reading is more in keeping with the spell text. The point of the spell is it changes you into a particular undead creature, and gives you some of the effects of being that undead creature, but in all other ways you stay the kind of creature you were originally. It doesn't add a vulnerability to searing light, but also does not take away that vulnerability.
So the lich turning into a skeleton by use of this spell is still just as affected by searing light as he was originally.