I like coffee, especially cappuccinos, so that is mostly what I evaluate. This page primarily has recommendations for small and independent coffeeshops; if instead you want inexpensive or mass-market coffee, it's not hard to find. For pedants, this page additionally contains recommendations for non-coffee items.
There are many large-ish chains, with varying levels of consistency and quality, for example La Colombe or Bluestone Lane. The line between "chain" and "small and independent but with multiple locations" is nebulous; I make no promises of semantic consistency.
Also, thanks to the various members of my coffee committee, Deepti, Panda, Paroma, Pratiksha, Rachee, Sagar, and Shoumik sending in their suggestions!
Note: Italian coffee culture is somewhat different than the other places on this page. For example, Italians don't drink heated-milk drinks such as cappucinos after 11:00. Also, the standard price one should expect for an espresso is €1, and a cappuccino should be €1.50 (this is when standing at the bar; table service is more expensive). If the place is charging more than this, you either have no other option or are rich (airports, fancy hotels, etc). As a result, my recommendation is a cappuccino in the morning and a cafe macchiato (espresso with a bit of foamy milk) in the afternoon. Italian espresso is much more drinkable than most other places on this list, so this plan wasn't an issue for me. You can still request milk drinks in the afternoon, but be prepared for some eye-rolling.
Also, I have only listed the places that especially stood out to me in some way. It is in almost all cases perfectly fine to walk into an arbitrary "caffetteria" for coffee.
Now, my actual recommendations:
Much like in Italy, Australia's base level of coffee quality is generally higher than what one is used to. In Melbourne especially, any arbitrary cafe will generally have good espresso. The local drink is the flat white, which is like a slightly less foamy cappuccino.
New Zealand coffeeshops are not as universally good; I liked Common Ground in Johnsonville, Wellington (in the community center/public library), as well as Storehouse in Taupo.
In Barcelona, Nomad Roasters seem to dominate the coffee scene. I unfortunately could not visit one of their own cafes, but have heard a positive report (thanks, Shiori!). I did get to visit CafeCosmo (which uses Nomad beans) which is also an art gallery, and I saw people working there as well. They have another location, CafeCometa, which I have not visited.
Also, Cloudstreet in the Eixample is a nice little pastry shop.