"I'm never sure which way to spell Amberg, Bamberg, Nuremberg. Hamburg, Pittsburgh, Parkersburg..."
Welcome to the club! If you don't speak German, you have lots of company.
There is no way to figure out whether "e" or "u" is right by using your own English pronunciation of these place names. Without knowing German already, you can only learn this spelling place name by place name - the same way you learned whether Pittsburg, Parkersburg, Edinburg, and Plattsburg are supposed to get an "h" at the end or not. As an English speaker, you have no phonological cues to rely on.
The reason this is so much harder with German place names is that there are so many -bergs and -burgs for you to remember individually. We don't have so many of those in English. It's a big brain task.
OTOH, small German children who are pre-literate have no problems learning to spell these places correctly later on because they have learned certain German phonological patterns which English lacks - patterns that ensure that places like Rothenburg and Rothenberg are not confused when they eventually learn how to write. To the kids, they sound different - so they automatically get spelled differently. Knowing how they are pronounced makes spelling them easy, as German spelling is highly consistent with the spoken word.
English however has certain sound-sequence restrictions on which vowels get pronounced in a "closed" syllable prior to "r" + certain consonants:
gorge ("o" vowel is present)
barge ("a" vowel is present)
But other sounds aren't permitted and disappear entirely - only the "r" sound is heard in these words, for example; vowel letters and vowel sounds are irrelevant:
urge/emerge/dirge/
skirt/hurt/Hertz
So when they're confronted with "-burg" and "-berg", English speakers oversimplify as they would in English, making spelling distinctions tricky.