A "setting" is a bit like "art"; we all agree that some things are examples, and some things aren't examples, but giving a hard-and-fast distinction is going to fail in both directions (false negatives and false positives). As a rough pattern, however, a "setting" will generally have some sense of place, theme, and history (or context, for things like really hardcore sandboxy campaigns).
Place can be anything from a multiverse down to a single village or school. The most common is a "region," which generally means something smaller than an entire continent but larger than a single city's practical reach (in terms of guards, army, taxation, etc.) or a single biome's reasonable size. Often, "place" also brings with it cosmology, explaining stuff like why there are devils and demons, or where souls go when they die (if this is known).
Theme has enormous variation, as one might expect. Dark and gritty. Noir intrigue. Fallen civilizations. Fantasy supers. Digging up ruins of the past. Etc. This is where most of the "flavor" of the setting can be found. Planescape, for example, has a theoretical place of "the whole multiverse" but is pretty thoroughly centered on Sigil as its place...and yet the punky aesthetics, the funny Sigil cant, the especially strong intermingling of planar forces, that's entirely Theme in nature.
History/context is the backdrop stuff, the immediate recent events, the climate around which things occur. So, for example, "metaplot" Dark Sun has a different history/context than 4e Dark Sun, because certain events from the Prism Pentad have not occurred in the latter but have in the former. If people reject a particular setting element introduced after a big setting is established, that's an example of preferring one history over another. While this part can theoretically be as open-ended as Theme can, in practice it's constrained by the previous two things because this is where you ensure that adventuring in this place, with this theme, actually makes sense.
But, as noted, there can be some real exceptions. A super-ultra "beer and pretzels" game may have no real theme beyond "diving into murderholes for phat lewtz," may have no well-defined "place" because the DM randomly generated all of the surrounding hexes and never put much effort into defining the starting location, and may have little more context than "you're a group of murderhobos taking jobs and exploring around, there's probably a king somewhere out there and some religion, but who really cares." I think such incredibly no-investment gaming is unlikely to remain stable in the long run, if only because individual characters will start becoming presences or parts of the history/context, and place was a key component of a lot of early hexcrawl play (that's literally what establishing your ruled-plot-of-land was for!), but an argument can definitely be made that this kind of game defies my classifications.