Even just fixing the vignette some lenses add is enough to make pictures no longer depressing. If the lens adds chromatic aberration that's quite difficult to fix though.
I actually tend to add vignetting in post-processing, so that's likely not the cause. The issues I had were with color rendition, and in particular with subtle variations in tone.
I don't remember there being any strong chromatic aberration either. I remember that both the 17-55/2.8 and the 17-40/4 where quite highly rated at the time, with the former having a better measured quality than the latter, even on a crop sensor.
Don't get me wrong, I don't remember there being any "technical" issues with the 17-55. It was plenty sharp and aberrations were kept to a minimum, especially since I never pushed my luck with strong backlight, etc.
But maybe that's the thing, images were maybe too "clinical". I wouldn't say the pictures were "depressing", they were just... "meh". Like random snapshots. Sharp, well-exposed snapshots, but snapshots still.
---
Edit: Regarding editing, I should add that I experimented with DxO optics, which had profiles for both lenses. The corrections were quite amazing, especially at the wide end. But given my usual subject matter, I never considered the change meaningful, so it didn't bother with it in my regular workflow.
I had a Canon 40D a while ago, and at first I was using a 17-40/4. I absolutely loved the colors I would get. Gradients would have a certain "creaminess" to them.
Then I figured I'd change it for a 17-55/2.8, to get some extra light at night. That was pretty much when I stopped going out taking pictures altogether. I just wasn't getting the pictures I wanted anymore. Everything looked just... weird and unsatisfactory. I then sold everything a when I realized I hadn't touched the camera in a year.
A few years later I got to do a similar comparison again, between the Olympus 17/1.8 and the Panasonic 20/1.7 on a Pen-F. The panny was OK, sharp, etc. But there was just something missing that the oly had. A kind of delicate rendering of gradients that just appealed to me.
This was when I realized what had happened with the Canon change earlier. I had believed that I had just lost interest in photography or that for some reason I just "didn't have it" anymore. I had never thought that a lens that was rated better in practically every aspect would actually be so uninspiring to me.