Let's take a neutral character.
If it is hit with Polymorph Any Object and is turned into a LG dragon, does their alignment change to LG?
Role-playing Games Stack Exchange is a question and answer site for gamemasters and players of tabletop, paper-and-pencil role-playing games. It only takes a minute to sign up.Sign up to join this community
By the Rules As Written: no. Polymorph Any Object acts like greater polymorph which acts like beast shape. Beast shape causes the character to take on a new form but does not affect their mind.
However someone might make a house rule along these lines. The official rules don't give us much guidance on how, specifically, creatures with an alignment get "drawn to that alignment" as they develop. I can imagine a DM might rule that creatures with a LG alignment are biologically predisposed to Law and Good, and that a character who spends a lot of time as such a creature might gradually, eventually become LG themselves.
There are no "LG Dragon" or "Lawful Good Dragon" creature on the bestiaries, there are dragons that are normally of Lawful Good alignment.
You cannot turn into creatures of a specific alignment or into specific creatures, because that is their alignment from their personality, not their form, and you assume their form, not their personalities.
Your aligment is not affected in any way by any of the (currently) existing polymorph subschool spells.
Unless otherwise noted, polymorph spells cannot be used to change into specific individuals.