Since when do astronomers have the notion that space is void?
(This is a mash up of the answers in Who was the first to postulate that space was a vacuum? and What was the first astronomical measurement which demonstrated that “the Earth is surrounded by vacuum”? )
The notion that earth is surrounded by vaccum has been around since at least the atomist philosophers like Democritus (c. 450 BC), albeit without demonstration outside of speculation it was open to debate.
Galileo himself had the notion that air is not weightless, which implies that the amount of air weighting on our bodies is limited, suggesting there is vacuum above it.
His disciple Torricelli invented the barometer, allowing him to estimate the amount of air above our head and demonstrate that space around the Earth is a vacuum.
Conclusion, Galileo most certainly had a clear notion that the planets are moving in a vacuum (which does not mean it is what inspired his laws of motion), and it was firmly established shortly after his death.