“Any rock large enough to be shielding for life would be superheated by impacting a wandering planet again destroying that life.”
The rock heats on the surface and upper layers while remaining cold in the inner areas. The heat of resulting from friction upon atmospheric reentry most often causes the rock to fracture and breakup during reentry, leaving the cold interior portions of the rock relatively unsscathed and fallin to the surface exposed and relatively undamaged by any heat. In many cases, it is almost as if the process worked as a seeding process.
Your hypothesis is based on an Earth like planet with an atmosphere which presupposes quite a bit for a wandering planet.
I think a wandering planet is likely to have its atmosphere blown away by wandering too close to a star.
I think a wandering star is also likely to be like Mars with a weak magnetic field (its core solidified billions of years ago) that does not protect its atmosphere from Solar wind and magnetic storms.
Without an atmosphere a large rock hit the surface of the planet at speed and is molten or vaporized by the force of the impact.