When planes engage with guns, many of the shots are misses... what happens to the bullets? Do they kill people on the ground and damage facilities? Do we have any records of this happening?
Do they kill people on the ground?
Almost certainly a few do.
People struck by falling bullets are more likely to die than people shot directly. The chances of a particular bullet falling onto a person are very small but over the decades, many many bullets have been fired by aircraft.
Between the years 1985 and 1992, doctors at the King/Drew Medical Center in Los Angeles, California, treated some 118 people for random falling-bullet injuries. Thirty-eight of them died.
Bullets fired into the air during celebrations return at a speed fast enough to penetrate the skin and cause internal damage to other organs in the path of the migrating bullet. The bullet’s velocity required for skin penetration is between 148 and 197 feet per second. A velocity of less than 200 feet per second, which is easily obtained by a celebratory gunfire, is capable of fracturing bone and even causing intracranial penetration . Spent bullets have the capability of reaching up to 600 feet per second during their downfall, and thus they have the ability to inflict damage to multiple body cavities . The larger caliber bullets (ie, .45-caliber) reach a higher terminal velocity compared with the smaller caliber bullets (ie, .30-caliber), because of the proportion of their weight to their diameter .
For those hit by falling bullets, the chance of the wound being fatal was far higher than a typical shooting. The hospital put deaths from regular shootings between 2% and 6%, while for those struck by falling bullets the death rate was close to one third.
These falling bullets were from celebratory gunfire, not fired from aircraft.
Aircraft cannon fire projectiles which are often much heavier than handgun rounds. If one falls on you, the likelihood of injury or death must be higher.
.22 Winchester magnum rimfire and .50 Browning MG rounds at same scale. source
Falling bullets are similar to falling stones, albeit with higher density and higher terminal velocity. Small ones won't do much damage, but I don't want to be hit by one from a 37mm cannon. Same goes for shrapnel: Flak/AA-guns could not fire steeper than approx. 85° to prevent the gun crews to be hit by their own shrapnel.
One airplane became famous (at least in pilot's folklore) for the ability to shoot itself down. According to that rumor, the Republic F-105 could outrun its own bullets in a shallow dive at supersonic speed. When the bullets, having been fired in horizontal flight, slowed down due to aerodynamic friction and went down in the usual parabola, an accelerating, diving plane could catch up with the bullets. The relative speed between both would be small, however, so the kinetic energy would cause less damage than bullets straight from a gun.
They can kill people or cause property damage. They probably won't.
If the plane is at sufficient altitude and shoots a bullet straight down, the bullet will encounter enough air resistance to slow to terminal velocity. It won't continue at the speed that it was when it was shot.
The same problem occurs with celebratory gunfire. If you're shooting at an angle less than 40 degrees, that can prove very dangerous. But straight up in the air, it probably won't be going fast enough on the way down to hurt a normal person.
You are not the first person to worry about this. In the 1942 war movie Mrs. Miniver a principal character is killed by stray bullets from an aerial dogfight. This was considered quite realistic as rounds fired in a low-altitude dogfight often had plenty of kinetic energy when they hit the ground.