I seem to recall that 20-25 years ago, we were told that diesels are wonderful. The goalposts keep moving. A cynic might think that it's deliberate, as it give new reasons to tax people. That's not to say that I think diesel exhaust is a good thing.
I think it's probably more that we discover new things all the time. Small turbodiesels have lower carbon emissions than petrols, that was and is a good thing. But we didn't know at the time the harm particulate emissions would cause until diesels became so much more common and asthma rates went through the roof. Correlation doesn't of course always mean causation, but I think there are major indications that in this case they are in fact related.
Even if you're not asthmatic, go to central London and have a wander round, and you'll realise how much nicer it is now than it was before the ULEZ. The air is genuinely clean, almost as clean as in the countryside. Other towns and cities, choked with older diesels, stink to the point you can taste it.
If you want a diesel, by the way, just get one with a particulate filter (and be sure to give it a decent long high speed blast every week or two so it can regenerate itself, or you'll forever have problems with it). The particulate/NOx emissions from these are about the same as a petrol. However personally, having owned one, I don't like the modern small diesels; the benefit of a diesel to the driver is torque, but a 1 or 1.5l diesel couldn't pull the skin off a rice pudding, and they tend to be slow to respond to the accelerator because of turbo lag. So if it's not an EV my next car will be petrol.