Firstly, we don't leave "big voids"; the oil is in spaces in porous rock, a bit like concrete breeze-blocks. Vast caverns can't collapse.
However, oil drilling changes the pressure regime, initially dropping it when the oil is extracted, and often raising it again later when high pressure water is injected to improve yields. The rock itself is slightly elastic, and there is some settlement, sometimes a few metres, again changing the stress.
There are large numbers of faults, and changing the stress pattern can result in yield along some of them, causing earthquakes.
Mining, and even constructing large reservoirs can have a similar effect.
Most of these quakes are of "nuisance value" at worse, though in the 60s an attempt to dispose of toxic liquids deep in the earth below Nevada was stopped, not because of environmental concerns but because they were getting too many damage claims due to minor earthquakes.
Big quakes, and especially volcanism, are on a different scale however, originating in the deep crust and mantle, up to hundreds of kilometres down and far beyond the range of even the most ambitious drilling project. There is no indication that drilling could have a measurable effects on those.