There are two sets of criteria :
1. The parameters set by your card issuer in respect of cash withdrawals from Spanish ATM’s including both GBP and EUR accounts
2. Spanish Bank ATM withdrawals charges
For example I sometimes use a GBP Monzo card at ATM’s. From memory they permit 300€ cash per month free and apply as close to spot FX rate as is possible
BUT all Spanish banks will charge for use of their ATMs - except if you are an existing a/c holder and at one of your own bank’s terminals
The very best deals last week were across the road from Maria Zambrano station at Ibercaja Banco
Monzo 0.98 € fee (GBP to EUR)
TransferWise 0.76 € (EUR a/c)
NB Beware the sheer skullduggery of Banco Santander for a non-account holder withdrawals!