Makes sense, since ISTR hearing that Appert's initial proof of concept used champagne bottles as the containers before switching to wide-mouthed glass containers similar to modern mason jars.
While googling to confirm, I came across this:
He believes that Appert wasn’t working totally from scratch. The idea of preservation by heat was known. There are also historical references to preservation of juice by mild heat treatments, a process now known as “hot filling.” This method was known in Roman times, although the Romans did not have hermetically sealed containers. But Appert could have known of hermetic sealing using water to tighten the lid to the jar for preserving kimchee and sauerkraut in crockery.
And I found this contradicting the claim that Romans didn't have hermetically sealed containers.
A team of chemists from the University of Valencia (UV) has confirmed that the substance used to hermetically seal an amphora found among remains at Lixus, in Morocco, was pine resin. The scientists also studied the metallic fragments inside the 2,000-year-old vessel, which could be fragments of material used for iron-working.
If accurate, the Romans had all the pieces but just didn't happen to have anyone put them together, probably because the hermetic sealing technique wasn't in widespread use, combined with a lack of theoretical groundwork (such as Spallanzani's work IOTL) that would lead someone to think to try combining heat treatments with hermetic seals.
Some General Additions
„In order to make their containers air and watertight, the Romans used heated resin known as pitch to line the
dolia and plaster to patch them where needed. The advantage of airtight containers was acknowledged by first century AD Roman agronomist Columella who warned his readers against buying
ollas bibulas aut male coctas, or jars which are porous or badly baked, and advised them to apply an inner lining and outer coating to the jars to create a tighter seal for the wine.“
http://www.academicwino.com/2014/07/history-of-wine-containers.html/
„Canning was a slow process in Appert's time. The cans of food had to be boiled in water for about five hours to make them completely sterile. But in 1860 it was found that adding calcium chloride to the boiling water made it possible to raise the temperature of that water more than 28 degrees Fahrenheit. This higher temperature worked better and faster. Canning became healthier and safer.“
http://www.brooklyn.cuny.edu/bc/ahp/MBG/MBG4/Appert.html
Spontaneous Generation and Pasteur's Experiment
There were several different ideas about spontaneous generation in antiquity. One would be very interesting, the Wind theory:
“The wind, too, plays a prominent part in popular beliefs. Pliny, XVI.93, tells us that animals mate and begin to conceive when Favonius starts to blow. This wind he calls genitalis spiritus mundi, 'the fecundating spirit of the world.' In view of such a statement, we are not greatly surprised to find the notion that mares conceived merely by allowing the wind to blow upon them. This belief was given a rationalistic interpretation by Justin,44.3, to explain the extraordinary swiftness of the horses of Lusitania. The wind might also impregnate sheep, tigers, vultures, and partridges. Partridges had as a rule to be on the leeward side of the male. At times it was sufficient merely for the hen to smell the male or to hear his voice.
The belief in the generative powers of wind had its effect even on house-planning. One of the reasons why Vitruvius, VI.4.1, advises not to let the library face the south or west is because the winds from these directions give birth to bookworms (Tineae) and nourish them. It was said that a heavy atmosphere begot τετράγναθα (Ael. XVII.40).
Wind eggs (hypenemia or zephyria) are formed spontaneously in birds and fowls, such as doves, hens, partridges, peacocks, geese, and χηναλώπηκες.Pliny (X.166) attributes such eggs to the lustful thoughts of the females or to dust.”
Lets say one of the more hands on philosopher really wants to figure out/ prove the theory above.
Moving air [1] is the most important factor in spontaneous generation.
Stale air itself does nothing. He designs a bottle that lets air in but not “winds”. Then have him cook the jars just be be extra safe. After all he doesn’t want the culture medium to spoil before the wind touches it interfering with his experiment.
Hey rigorous separation of different variables isn’t a thing yet and “spoiling” is from an outside look a totally unrelated decaying process anyway. And luckily it can be delayed by heat ;-). To his surprise the bottle keeps unspoiled and insect free for a year. But once “wind” comes in contact it immediately goes bad. A stretch sure, but very much in the theoretical framework of its time.
Now if this discovery and the development of canning in general are actually useful for the classic world for more than novelty value is a whole other thing.
[1] If anybody is wondering about this part, Greek philosopher did in OTL have some "interesting" ideas on breath/pneuma/air motion and wind/weather phenomena. Our hypothetical philosopher would feel right at home.