Well, the Starbucks next door is still there, so one business was able to pass on its costs, the other was not. Also, the McDonald's mainly served the elderly and those on fixed incomes, so clearly their customer base wasn't going to pay the price of a latte for a cheeseburger.
Admittedly, though, it is just an anecdote.
If you're talking about First Hill, you're comparing a single story standalone McDonalds in a neighborhood of highrises to a Starbucks taking up a single retail storefront in a full-block hospital complex. Not quite equivalent real estate.
Yes, that McDonald's was fighting an uphill battle.