I can think of two relevant factors.
"Superior" and "inferior" are "Standard anatomical terms of location" (Wikipedia) with directions that are defined relative to the standard anatomical position. As far as I know, "upper" and "lower" are not strictly defined in this manner.
Another relevant factor is that "superior" and "inferior" are not only English, but also Latin, so you can expect to see them rather than "upper" and "lower" in set phrases inherited from Latin.
"Vena cava" was inherited as a set phrase from Latin, and so it makes some sense that people would be used to seeing this phrase in Latin language contexts, where one might write about the "vena cava superior" (in Latin adjectives usually come after the modified noun, although this is not an absolute constraint), and when speaking in English, would call it the "superior vena cava", changing only the word order to conform to English conventions, but not changing the adjective used to descibe the vein.
Examples of use of Latin phrases and word order to refer to the venae cavae:
Vena cava inferior.—The vena cava inferior is the trunk of all the abdominal veins and those of the lower extremities, from which parts the blood is returned in the following manner.
(Pantologia: A New Cabinet Cyclopaedia, Vol. XII, 1819)
AA. The vena cava anterior.
BBB. The venae cavae inferiores.
("Sir Everard Home's account of the circulation of the blood in the class Vermes," Philosophical Transactions of the Royal Society of London for the year 1817)
Side note on pluralization
Note that, while the proper plural forms in Latin of the adjectives "superior/inferior" are "superiores/inferiores" respectively, I have never seen these used in English in preposed position. For the plural of "superior vena cava", people most often write "superior venae cavae"; a small number go full Latin and write "venae cavae superiores" (or go the other way and write "superior vena cavas"), but the Google Ngram Viewer indicates negligible usage of "superiores venae cavae":