Yes, and also No, but sorta mostly Yes
The default setting of D&D 5e is “The Multiverse”, and as far as I can tell this contains all possible worlds, including words with different cosmologies. This is a result of The Multiverse being the default setting, and the canonical notes in the DMG that the planes can be chosen à la carte by the DM when designing a campaign setting.
The latter means that each setting can have a different planar cosmology, as designed by the DM. The former means that even such worlds share the same Multiverse, despite differing planar cosmologies.
The conclusion then is that no, the existing published worlds don’t have a shared cosmology… and also that there is another version of each that does.
Aside, another consequence of the Multiverse is that one group’s Forgotten Realms (to grab one example world) is a distinct part of the Multiverse from each other group’s Forgotten Realms, all of them part of the Multiverse. Basically, there are infinite variations of each world, with infinite variations of cosmologies, and infinite permutations of sets of these with shared and cosmologies and without.
The upshot: practically, players consider settings and cosmology to be somewhat shared
In practice, many groups appear to see the Forgotten Realms as one place by default, and seem to assume that there is one shared cosmology. Most people don’t seem to even need it to be clearly defined in the first place.
Consequently, you can write and publish with the confidence that most of your potential audience will be happy to accept the assumption that (e.g.) the Forgotten Realms and Greyhawk share the same (e.g.) Bytopia, if your product makes that assumption.
Put another way: the rest of them — that is, anyone who has opted to take the DMG’s advice and craft a separate cosmology —may still find use in cherry-picking your material to suite their needs just as they did with the DMG chapter on cosmology design.
You can even encourage this, by giving your default assumptions but taking the DMG’s lead and noting that everything presented is optional and can be mixed-and-matched. Even if your assumptions make that hard to do, you should be fine — anyone doing an à la carte treatment is already confident adjusting your material for you.