I think my major gripe with it, at times (because I enjoy dark/gritty settings) is that they often fall into the mistake of making it too much so, because ‘it used to be like that back in the day!’ when their sources of ‘back in the day’ is a bunch of Victorian era ponces trying to make themselves look better by pretending anything that came before was much worse
There’s a lot of bad misunderstandings about the medieval era (if you can even call that a single era - which you can’t, really, but that’s besides the point), ie people didn’t marry when they were just kids (usually early 20s!) and that’d shift to even later in the early modern era (The Emperor Charles V did some legalese about marriage for men under the age of 25 and women under the age of 20), and only went down (much) further far later
Similarly, sexism is often portrayed as ‘gritty’ when women only get to sit at home because ‘it used to be like that’, but that too is only a much later thing - economical circumstances didn’t even allow for that to happen. Men and women’d have different roles in the agricultural work in the rural parts of the world, but they’d both work, and in the cities women’d generally also work, like in construction, or in carpentry (mind that a carpenter’s guild also enveloped painters and any and all sorts of that sort of thing), or other crafts (vs the often thought of sitting at home vs nunnery vs prostitution and nothing else).
The Inquisition wasn’t like the (horrid) Spanish Inquisition during the Reconquista and Italian Inquisition during the contra-Reformation and often functioned much more like a civil court but for religious matters.
etc etc
tl;dr I think the pitfall of a lot of ‘ohhh im writing a gritty setting…’-ing is not in making them gritty, or dark, or terrible places to live in, it’s in arguing that ‘things used to be like that!!’ as the sole reason to make them more so than reality often was, because that’s often based less on the actual way of things at the time (and how these were terrible) and more on 19th century brits’ attempts at feeling better about their own horrible society - like how most ‘medieval’ torture tools are Victorian works and inventions of fiction. Renaissance and Victorian era writers have done a very good job, too, at making the whole 1000-ish year period look like an era without science or learning, when it actually saw major scientific developments throughout, with the sciences in Western Europe especially being broadly well-funded by the Church (once again as opposed to its usual depictions which then carry over in fiction)
the issue isn’t settings being terrible places to live in because historically, things were and that’s where they draw inspiration from, it’s because the inspiration they draw to justify it being sucky is drawn from the wrong sources, at least if you want to root the terrible nature of it in reality!