Yes, Spanish banks have to accept your request: however, the latest mortgage laws in Spain (2019) have obliged banks to be rather cautious when it comes to lending money.
In addition, banks usually lend up to 70-80% of the sales price, while developers currently offer up to 90% mortgages for new properties.