Flesh Golems can't be undead because they were never alive they are simply made from once living tissue. They become alive in a few versions thus they are "Living" creatures.
Ghosts arn't undead because they arn't technically dead or alive. They are Non-living creatures.
Lich arn't undead because they are simply alive.
Vampires are a special case and it really depends... They are either Undead or alive.
Zombies are conditional. They are either Animate Dead or Undead. As far as Dwarf Fortress is concerned Zombies are a curse/condition.
Though this changes if by undead your refering to: Kept alive through unnatural means... In which the Liche, Vampire, and Zombie count... Ghost and Flesh Golems don't.
What is your definition of "Undead"? Wikipedia says: "Undead is a collective name for fictional or legendary beings that are deceased yet behave as if alive. Undead may be incorporeal, such as ghosts, or corporeal, such as vampires and zombies."
Ghosts are undead because they are dead, or come from a being that is dead, yet behave as if alive-- eg, they move around, think, talk, etc.
Liches are undead because they have killed themselves, and thus are dead, yet utilize magic to retain a semblence of being alive-- eg, they move around, think, talk, etc. HECK! The name "LICH" litterally means "CORPSE"!
Zombies are undead only if they are corpses that are walking around, as opposed to living beings with super-rabies or whatever. But if they were once dead, and are now walking around, they are undead.
Vampires are traditionally undead, because they come from corpses. Wikipedia says: "In folkloric tales, the undead vampires often visited loved ones and caused mischief or deaths in the neighbourhoods they inhabited when they were alive." Now, Anne Rice vampires may or may not be undead, but even her vampires CAN be classified as undead if you assume that they die as a part of the process of becoming a vampire.
I will agree that a flesh golem is not an undead, however, in that a golem is by definition a newly created form of life. LIFE. So it isn't dead. You could, on the other hand, have an undead flesh golem if the original flesh golem is killed, and then either demonstrates a spirit via ghostly manifestion, or is reanimated as a zombie, or is made a lich, or a vampire...