There is nothing grammatically wrong with had had, but here it means the same (more or less) as had possessed, which means the city used to have these things, but it doesn’t at the time the POV character is seeing it. Since it’s highly unlikely that’s what the writer actually meant, I’m going to delete one had and make the sentence say what it’s supposed to say.
Also, there shouldn’t be a comma between metal and spikes; the comma belongs after spikes instead. (The spikes are dirty metal instead of the dirty metal and the spikes being two separate things.)
It wasn’t like any city he’d ever seen. It had harsh edges, dirty metal spikes, and looming towers. And yet it held a beauty that was hard to comprehend.
This still doesn’t seem quite right to me… While it’s not incorrect now, I think the last (fragment) sentence should be joined with what comes before it: It had harsh edges, dirty metal spikes, and looming towers, and yet it held a beauty that was hard to comprehend. Now the combination of harsh edges, etc., with the hard-to-comprehend beauty is what makes the city unlike any other, implying that there are other harsh cities and other beautiful cities, but there are no other cities that are both. Maybe that’s not what the writer intended, but if it was, this is how to say it without changing the words.