And the moral? It's bad to be gay.
That's not the moral. Let's look at Card's version from the viewpoint of Hamlet's father:
Hamlet's father is a lousy king who sexually assaults a number of underage boys. He gets away with this for AT LEAST 20 years, possibly longer. Even though he's murdered by one of his victims, the death is fairly quick. Even AFTER dying he gets to come back as a ghost and bully his son, the one boy he DIDN'T rape, into killing off his surviving victims, thus preserving the dead old pedophile's legacy. To cap it all off the death of Hamlet's father is blamed on Claudius, ensuring that the single surviving victim, Horatio, will be forced to choose between his own execution for treason and murder, or holding his tongue on what Hamlet's father did to him as a kid.
After all of this, Hamlet's father gets to spend eternity raping his own son.
This isn't a condemnation of homosexuality, but a roaring love letter to pedophilia. It might as well have the subtitle "The pedophile triumphant" or "the virtues of raping little boys."
And yes, I'm posting that as an Amazon review of the book.