Can I use a WF ATM card at the airport in Madrid in order to get
Euros [sic, it's euro]? Is there a better/cheaper way?
Using an ATM card at a bank ATM at an airport is probably the cheaper way, if you don't get sucked into Dynamic Currency Conversion. But beware, sometimes airports sell the ATM concession to a 3rd party (like Travelex) that doesn't have to play by the rules and they could charge you extra. Best use an ATM at a bank.
But, a Wells Fargo ATM card, or any other major bank's ATM card, is not the cheapest way Major baniks charge about 4% for foreign currency exchange at the bank (3% plus $5, which is 1% more on a $500 withdrawal limit). Smaller local banks seem to charge a little less, credit unions even less. A few banks don't charge anything. So look for a bank other than Wells Fargo (or Chase, USBank, et al).
$180 more than the going exchange rate
Sound like you were trying to buy about 3000€. Don't do that. I would buy and bring along 100€ or so (enough for my first day's expenses, until I could find a bank with an ATM, in case something went wrong at the airport ATM). But after that I would use ATMs over there. $180, by the way, it about as good a price as you will get over here. A few years ago, I did an extensive test on the cost of getting foreign currencies over here, and WF, at 5% over the Interbank rate, was the best I found. Sometime in the early morning, WF looks at the Interbank rate and sets their rate for the day at 5% over. That's their rate for the entire day. If the Interbank rate goes up or down during the day, you pay less or more than 5% over. Right now, WF is charging $3723.60 for 3000€. At the official exchange rate, according to Oanda, it's $3539.98 for 3000€, so WF is about $184 more. But if you withdrew 3000€ from ATMs over there with your WF card, you'd pay about $3686, still about $150 more than the "going" rate.
The reason DCC is such a bad deal is not that the merchant or bank gets to charge you their conversion rate, but that is doesn't save you money on the conversion by the bank. Your bank no longer calls it an exchange fee, it's an International transaction fee, and you pay it whether the charge is in euro or dollars.