Getting to Earth
The writers were asked this very question on the old movie message board (now defunct):
- How did the Autobots travel to earth? During the fight scenes they are incapable of flight - they keep falling to the ground (even Optimus), and when they want to get on top of a building they just climb step by step.
Are they now "trapped" on earth?
1.) They crossed interstellar space in a larger ship and then entered our orbit in pod-like protoform. We'll let others decide if they're trapped.
We see the Autobot ship The Ark in Dark of the Moon, which Optimus explains was the ship that Sentinel Prime had been aboard when he crashed.
We see a similar ship used by Lockdown in Age Of Extinction, while the previously canon prequel book Ghosts of Yesterday mentions The Ark (the Autobot ship) and The Nemesis (The Decepticon ship), however the story was later contradicted by the Dark of the Moon details.
Being frozen on Earth
It's important to remember that Megatron didn't just fly to the Arctic Circle and become immediately stuck/frozen. The ambient cold alone wasn't what trapped him. An already weakened Megatron (lacking energon from traveling and entering the atmosphere) landed and then fell into the water, where he was frozen. This is backed up by the fact that Sector 7 uses liquid nitrogen to keep him frozen at some -320°F. Coupled with the fact that we see Transformers traveling and remaining in space just fine, we can conclude the cold alone is not enough to damage them severely.
All scans are from Transformers: The Movie: The prequel