I assume that due to the description of verbal components:
Most spells require the chanting of mystic words. The
words themselves aren’t the source o f the spell’s power;
rather, the particular combination of sounds, with
specific pitch and resonance, sets the threads of magic
in motion. Thus, a character w ho is gagged or in an area
of silence, such as one created by the silence spell, can’t
cast a spell with a verbal component.
That we will need some way to make sound. This in turn requires an atmosphere/medium through which the sound can travel as it strums the weave.
Mirage Arcane
Mirage Arcane could potentially give the effect of an atmosphere and states:
You make terrain in an area up to 1 mile square
look, sound, smell, and even feel like some other sort
of terrain.
i.e. make space look, sound, smell, and even feel like air
also:
The illusion includes audible, visual, tactile, and
olfactory elements, so it can turn clear ground into
difficult terrain (or vice versa) or otherwise impede
movement through the area.
meaning that the stuff the illusion is made out of is at least partially there?
while the creature is aware of the illusion’s presence, the creature can still physically interact with the illusion
therefor even if a creature knows that the illusion is present they can still breath in the knowledge that the air isn't real.
I assume the illusion is in some way connected to the ship and moves with it even after the ship had left orbit since otherwise there would be issues of magical space relativity and would get complicated fast. Therefore if the spell were cast while standing on the ship before the ship leaves orbit then the mirage arcane would follow it out of orbit using the deck of the ship as the ground.
I posted this question about casting a spell twice and find that if the second and future castings were cast before the end of the previous castings 10 day duration then the duration would be reset to 10 days.
SpellJammmer
Another option is to use the physics from SpellJammer (from D&D 2e) whereby as a SpellJammer left orbit it just took a certain amount of air with it and that air would run out eventually. An alright port to 5E was made here but please note it does come with its own system for moving ships and powering ships etc