The stats themselves don't change
...but the effective stats will.
The flavor text along each step of the way describes in-fiction reality, but we'll have to go through a bit of a process to find the mechanical "how-to", rather than just flavor text.
The mechanical description of polymorph any object states that:
This spell functions like greater polymorph, except that it changes one object or creature into another.
So, the spell exclusively changes objects and creatures into those of different types, until we get to what's effectively a footnote on PFSRD:
This spell can also be used to duplicate the effects of baleful polymorph, greater polymorph, ...
To be clear this spell provides no unique mechanics, aside from its duration table - the details of transformation are left to those other spells listed. So, the mechanical effects of this particular transformation would be handled under the rules of greater polymorph, as the only one that could actually do what you describe.
Greater Polymorph further redirects you:
If you use this spell to cause the target to take on the form of an animal or magical beast, it functions as beast shape IV.
So among other steps in beast shape IV's transformation process, we finally get to the stat effects:
Huge Animal - If the form you take is that of a Huge animal, you gain a +6 size bonus to your Strength, a -4 penalty to your Dexterity, and a +6 natural armor bonus.
Note that this is not a complete "replace your stats with the new form's stats", it is a bonus modifier applied to your original stats.