Published music for the masses was definitely a big deal from the Renaissance Era and later. Over a century before Bach, Italian and English composers were publishing love songs known as madrigals, that a small group of people (or a solo singer with a lutenist) could sing. These were the "pop songs" of the day, and they led to the development of opera. Meanwhile, others such as Praetorius were publishing collections of simple folk dances (Terpsichore, 1612). Most people during this time also attended church services, where they would be regularly exposed to sacred music. Contemporary to Bach, Telemann published a periodical containing sonatas that were accessible to amateur musicians called "Der getreue Musikmeister" (The Faithful Music Master), and this is hardly a unique case.
You dismiss operas, but I think opera attendance was likely more popular than you give it credit for. You didn't have to be some high-falutin' well-to-do nobleman to get into an opera. These were the popular entertainment of the day, much like attending a movie theater today.
There was also, at least in England, an avid market for purchasing published transcriptions of opera music. Since there was little-to-no copyright law at the time, these transcriptions need not be officially authorized by the composer or opera-house. To illustrate this last point, I found a doctoral thesis, The Tradition of Transcription, by Sara Anne Churchill (University of Toronto, 2011) which discusses the phenomenon. I'll quote the first paragraph of the abstract here to let her make the basic point, and avoid potential link rot.
Eighteenth-century London was a hotbed for instrumental arrangements, and many of these works were derived from the operas of George Frideric Handel (1685-1759). Thirty-one of his operas, in whole or in part, were arranged for recorder or flute, and there were over seventy keyboard transcriptions of the overtures to these operas. While the transcriptions of Handel overtures have been thoroughly examined, opera aria transcriptions have never received an appropriate level of study and analysis. The Lady’s Banquet or The Lady’s Entertainment provides an excellent starting point. Not only does it include numerous opera aria arrangements, but its volumes were re-issued several times, suggesting a wide circulation. Its study raises a number of issues, including publication and authorship of Handel transcriptions, gendered music of the eighteenth century and analysis of opera transcriptions.
Even if you weren't able to play music yourself, you likely knew someone in your circle of acquaintances who could. In short, before music could be recorded, all music was experienced live, and was therefore the result of people getting together and playing music, in whatever circumstance might call for it -- whether that be a soldier's march, a tavern drinking song, a mother's lullaby, a church service, a love song, a folk dance, an opera, or just getting together with friends and "jamming".
Fast forward now to the early 20th century, and it's this very culture of live music performance that John Philip Sousa fears is in danger of being lost, due to the advent of music recording machines. He writes, with what he admits may seem an alarmist tone, in The Menace of Mechanical Music (1906):
Right here is the menace in machine-made music! The first rift in the lute has appeared. The cheaper of these instruments of the home are no longer being purchased as formerly, and all because the automatic music devices are usurping their places.
And what is the result? The child becomes indifferent to practice, for when music can be heard in the homes without the labor of study and close application, and without the slow process of acquiring a technic, it will be simply a question of time when the amateur disappears entirely, and with him a host of vocal and instrumental teachers, who will be without field or calling.
Elsewhere[citation needed], he says:
These talking machines will ruin the artistic development of music in this country. When I was a boy, in front of every house in the summer evenings, you would find young people together singing the songs of the day or old songs. Today, you hear these infernal machines going night and day. We will not have a vocal chord left in America!