How are the sound levels of a movie set? Does the theater decide how loud they want movies to be, or is there an automatic system that allows the publisher/distributor/producer/studio to set the sound levels?
The overall answer is it can depend, but it's usually set by the movie theater.
Unless the studio has requested an optimal volume range for a movie, the theater is free to set the volume at whatever level they want. Disney was fairly notorious for this when I was a projectionist (from 2007 to 2011). They would include a "guide card" for things like bulb brightness and suggested volume level for many of their movies, especially animated features. They would even send in secret viewers to rate our presentation and provide us with feedback, and would send us little gifts if we had "perfect presentation".
Otherwise if people complained a movie is too loud or not loud enough, if they informed someone on the ground they could let projection know, and we'd take it up or down a couple notches.
However, loud can also be a fairly generic thing to describe. Movies can naturally be louder or quieter than others, either in full or from one moment to another, and that's all depending on how the sound was mixed and applied to the film. Used to be a notorious issue in the US with commercials being dramatically louder than the TV shows they were advertising on, that the Commercial Advertisement Loudness Mitigation Act (or CALM Act) was passed. However, as with most regulation, there are ways around it.
Naturally, audio is also a relative experience: what may be too loud for one person could be too quiet for another. For people who are hard of hearing, many theaters offer special headphones that offer an amplified audio feed for them so they can hear a louder version of the audio without making things too loud for others. There's even options for people who are completely deaf to provide closed captioning of dialog, or for blind patrons to offer descriptive audio to help explain what's happening on screen. Not every theater has these services, though.
The relative volume (this piece of dialogue is louder/quieter than that sound effect) is determined by the producers and part of the film (or digital video). The absolute volume (this is how high we crank the speakers) is decided by the theater.
When I worked at a theater, we had special showings intended for parents/caretakers with young children/babies where the lights were a bit brighter and the overall volume was much lower than a normal showing.
The basic parameters like sound (or) volume levels in different channels and brightness of projection is preset by the producer to levels set on consensus of optimum on average but optimal level differs with respect to dimensions of theatre and electronic systems used, henceforth the projection technicians vary the sound level considering their theatre in playback devices without affecting the original data.
Here is the reference - https://www.icacommission.org/Proceedings/ICA2016BuenosAires/papers/ICA2016-0313.pdf
These are the basics of Modern Sound Engineering and are available as a post-graduate course in the name, "Fundamentals of Acoustic Space Design"