When people talk merit, they are also taking into account things like you said like location and compensation as obvious points that apply to all. You can have a great candidate but if the guy lives half way around the world or is asking for $500,000 for a job that has a pay band of $100,000-120,000 it's obvious that guy wont cut it.
But they don't apply to all - and above all, companies filter them based on THEIR capability (or appetite) to hire -
not the candidates merit.
Compensation bands for instance - don't apply to all people equally (from heavy reliance on geographic factors, to historical salary progression to your own ability as a salesman and much more). Some individuals command their own market-value that - irrespective of what the company is able to
afford -
market at large is willing to pay. You can flip-this upside down and argue that maybe everyone in that company is underpaid - or that person is overvalued, or some combination of all of that - but discussion at this point is about $-valuation of said merits, not the merits themselves.
Interview loop is where merit is evaluated - but if you never get there, you're being filtered (in or out) on many other parameters.
But all things being equal, except race, gender, sex orientation etc... if a company is purporsely hiring based on skin colour, age or how tall someone is to check off a quota box to make their %'s look cozy is just as discriminatory as it gets.
Hiring decisions are what needs to be (and ideally is) merit based (most well respected companies do an ok job there - though admittedly, less so in games - but I'm not gonna go down that rabbit hole now).
Selection of the talent pool isn't (and never has been, unless your talent pool is so small you interview everyone - but then you're being filtered somewhere else, externally). Yes it sounds more iffy if said filtering is against things from your list - but let's be honest, before DEI this was still happening, it just wasn't dressed up in virtue-signalling initiatives and had no good intentions attached to it.
In the end the fear-mongering about 'bad-talent' is bunk though. If the filters are setup badly - you get too few candidates, and both the recruiters and the teams they serve fail their KPIs. And with fewer hires there's no possibility of winners in DEI % either - as you will only move those KPIs if you hire substantial numbers.
On the other hand, if candidate numbers are sufficiently high and enough of them end up getting offers after the interview - then the concern about 'is the "right" talent hired?' is moot. As obviously the answer is yes - otherwise we're in scenario 1).
And it's even worse when the person doesn't even qualify, but still gets it.
For this to play out - you have to assume bad actors with lots of influence And/Or bad company hiring policies to enable it. And if that's the case - the company was already setup to fail before discussing any DEI influences (ie. if hiring process is prone to hiring unqualified candidates - that's an artifact of a bad system, not KPIs).
And there is good reason for that. Because many countries have demographic quota requirements to qualify for federal bids. If you dont cut it, you dont qualify. Big corporations are the ones who gun for this, thats why they care. Small companies who dont have the capacity or care about a gov contract dont ask because they arent bidding for contracts anyway. So it's moot.
Political influences are another side of the story (the quotas are a very US-centric problem for instance). School systems have massive issues of their own(manifested differently in other parts of the world, but really the same thing), the fact minorities are DEI-ing other minorities in US schools is well - kind of endemic of the systemic issues there.