First of all, there are no Moon-sized asteroids in the (sufficiently inner) Solar System. The largest asteroid has radius 450 km which is about 4 times smaller (64 times smaller volume) than the Moon. Moons of planets are not counted as asteroids.
A collision with a Moon-sized object would of course be a terminating catastrophe for the Earth. If you look at the explanation of the Torino scale of such impacts
https://en.wikipedia.org/wiki/Torino_Scale
you will see that the largest diameter even mentioned in the graph is smaller than 10 km, and those already exceed the highest Torino 10 scale which corresponds to the global destruction of the civilization.
You are talking about a collision with an object that is 400 times larger in linear dimensions which means 64 million times larger in volume and mass.
If such an object had the usual velocity, and it would have to have because no similar large objects are "synchronized" with the Earth near its orbit (which is needed for the relative speed to be much lower), the impact energy would be so high that the whole Earth would melt.
This is not something unprecedented. After all, the Moon was (probably) created after a similar collision. The Earth used to be smaller at that time. A large celestial body collided with the Earth. The whole Earth melted and a sufficient piece of the Earth – and perhaps with pieces of the other body – went into space and became the seed of the Moon. The Earth itself ended up larger than before the collision.
Another collision like that would probably create another Moon from the escaping material (most likely, a smaller one than the Moon we already have because the attraction of the now-larger Earth is stronger and keeps most of the material here) while the rest of the Earth would grow even bigger than it is now.
The geological processes would start from scratch. I don't know where and how life could survive. Perhaps some bacteria in our satellites etc. would survive and could return, to speed up the evolution. Just to be sure, no one would survive by hiding in a basement, not even a heavily fortified one.
Imagine a blunt object like a space-capsule entering the atmosphere. It experiences a decelerating force, right? If you divide this force by the surface area of the blunt front facing surface, we get an effective pressure. The atmosphere has to create this pressure in front of the object, otherwise there would be no force (a molecule streaming by the sides of the object without hitting it can't create such a force). This compression also heats the gas in front of the object.
The hot, dense gas now streams along the sides of the capsule. If we want to keep the capsule cool, then we certainly don't want this hot gas to touch the body again, which is why capsules are entering with the broad side and are not flying like planes with a sharp nose cone. The body angle has to be small enough that the gas can pass the entire body before it expands enough to reach the walls.
You can see these effects nicely in old NASA images showing the supersonic bow shock around models of their capsules, the dark areas are dense gas under high pressure, the light ones are less dense, low pressure regions:
The majority of the kinetic energy in the capsule will be converted to heating of gas in this bow shock, only a fraction of it will be absorbed by heat shield and an ever smaller amount will heat the backside walls. Without this phenomenon re-reentry would be an even harder thermal problem than it already is.
Best Answer
As mentioned in NotAstronaut's answer, objects smaller than 25 meters will typically burn up in the atmosphere. One can very easily see why this should be the case using Newton's impact depth formula. This is based on approximating the problem by assuming that the matter in the path of the object is being pushed at the same velocity of the object, so as soon as the object has swiped out path containing the same mass as its own mass, it will have lost all of its initial momentum. All its kinetic energy will then have dissipated there, so if this happens in the atmosphere it will have burned up before reaching the ground.
This is, of course, a gross oversimplification, but it will yield correct order of magnitude estimates. We can then calculate the critical diameter as follows. The mass of the atmosphere per unit area equals the atmospheric pressure at sea level divided by the gravitational acceleration, so this is about $10^4\text{ kg/m}^2$. If an asteroid of diameter $D$ and density $\rho$ is to penetrate the atmosphere, its mass of $1/6\pi \rho D^3$ should be larger than the mass of the atmosphere it will encounter on its way to the ground, which is $5/2 \pi 10^3 D^2\text{ kg/m}^2$. Therefore:
$$ D > \frac{1.5\times 10^4}{\rho} \text{ kg/m}^2$$
If we take the density $\rho$ to be that of a typical rock of $3\times 10^3 \text{ kg}/\text{m}^3$, then we see that $D>5\text{ m}$, which is reasonably close order of magnitude estimate to the correct answer.