So in this video https://www.youtube.com/watch?v=tdBNYvrLeJ4 (Not my recording) we see the shell fly off in the background, were they are deaths or injuries caused by such a thing when people were a distance from the battle field?
There have been plenty of incidents of unintentional kills from munitions which were aimed at one target and ended up hitting someone or something else, though I can't imagine anyone would have made remarkable note of it: Dead in combat is dead. Anti-air artillery is a great case in point: What goes up must come down.
However, the use of ricochets was also well known as a deliberate technique. A tank destroyer unit in Italy reported it as a reliable way of killing Elefants and Tigers, bouncing off the road in front of the vehicle to hit the lower hull. Aircraft pilots would try the same thing, though I am highly suspicious of their claims of effectiveness with .50 MG fire. Against entrenched troops, a HE round fired on base/delay could be aimed maybe 30m in front of the target, it would ricochet up into the air and explode in an airburst. Useful against troops in cover. (We now have more reliable ways of getting a round to detonate in mid-air). Finally, small arms grazing fire can use the tendency of a bullet to 'hug' a wall or road, usually within a foot or so. This is why troops are supposed to be trained not to be close to walls when under fire: They would be easy kills.