like is doing some heavy lifting here. We have had asteroids pass by at a distance closer than the moon. That's pretty damn close in my book relative to the size of the cosmos. At that scale, that's pretty much a ringer in horse shoes.
The buzzcut is a very strange question though. If the thing enters the atmosphere and does not burn up, it is hitting the ground.
You are slightly mistaken. There have been hit-and-run asteroids that entered the upper atmosphere and skipped through. https://en.wikipedia.org/wiki/1972_Great_Daylight_Fireball The Grand Teton Meteor / The Great Daylight Fireball of 1972 came within 35 miles of the surface. A huge iron meteor might survive a low pass but this would be a very rare event.
Anything that comes closer than the ISS (give or take) is going to interact with the atmosphere which is going to change the dynamics considerably. Generally something with the right orbit to pass 20m above the earth's surface is going to burn up in the atmosphere or hit the surface. The drag is going to kill its orbit fairly quickly.
To have enough energy to come that close without doing so means it has enough energy that superheating the atmosphere or generating nuclear events through impacts with air molecules starts to become a problem (or both: first one then the other). This is the "baseball at the speed of light" type problem from XKCD.
If you come in at exactly the right angle (because you'll skip off the upper atmosphere if you come in too flat) and if you're fast enough, it's entirely possible to enter the atmosphere but fail to complete the aerobreaking maneuver, resulting in an exit from the atmosphere at above escape velocity.
The stress of this maneuver is considerable, especially if you get as low as 20m above ground, so the object would need considerable shear strength and yield strength. Also high density and high thermal capacity. But not unrealistic, I think a tungsten ball (or better yet, a solid tungsten lifting body with aerodynamic steering authority) should make it through.
You can even exit the atmosphere but not have escape velocity, effectively using the aerobreaking maneuver to assist in the gravity capture of your object. But you'd better circularize the orbit shortly after, otherwise your next pass through the atmosphere is going to be terminal.
Relativistic baseball effects aren't very relevant yet, I'm talking about objects hitting the upper atmosphere with around 20-50 km/s. Enough to leave again, not enough to start a fusion reaction.
I don't think a 20m buzz cut and back to space is possible. To get back to space you need at least low earth orbit velocity which is about 16,000 mph and stuff going that speed low in the atmosphere gets very hot and would probably melt and break up. Maybe if it was a big one some would break off and some make it back.
I am not that good in physics so someone should probably correct me but if an object comes at such a speed that it escapes earth gravity, it'll probably eject us from our solar path into the unknown.
The mass of such an object is likely be miniscule compared to the mass of the earth. So even a very close approach isn't likely to make much difference to the earth's orbit.
E.g. an asteroid 100m across with the same density as the earth is going to have ~0.0000000000001 the mass of the earth.
Mass is relative to speed. If the object has a very high speed, it can reach the mass of the earth or even higher. That's why my understanding is that if it can escape the gravity of the earth, it means its own gravitational field is as or more powerful.
The mass of an object increases appreciably with velocity only at relativistic velocities. This is completely irrelevant at the speed an asteroid is likely to be travelling.
If an asteroid travelling at relativistic velocity passed through the atmosphere, a change in the earth's orbit would be the least of our worries!
Like is it possible for an asteroid to give a city a "buzz cut" and then continue on into outer space?