Shouldn't Pain's head have melted off during the fight with Naruto as 9-tails? When Naruto and Pains were fighting, Naruto turned into Naruto's six-tailed version 2 form and he held Pain's head. As we saw with Orochimaru's fight, his snake melted off when he touched Naruto.

Why didn't he at least get a burn?
That's probably just because Pain needed to appear stronger than Orochimaru, but we can try to make it work.
First we should note that it wasn't Orochimaru's body that touched Naruto, but his snake. Which we can try to understand as being a product of some jutsu, not just a flesh-and-bone snake. Orochimaru could just be so good at chakra shape transformation that he could give an actual physical appearance to his chakra, and not just a generic shape like in most jutsu, and the plot does give him this level of talent.

Now, with Pain, we know that the Rinnegan has some very strong chakra absortion and manipulation techniques, and the fact that the bodies weren't really alive, but rather being controlled remotely, could reduce the "rotting" and "melting" effect, after all, Naruto is touching dirt, grass and rocks and none of those are melting on contact.