Great question — answering as the UphillTech team:
This seems to be an insurance issue. I seen in the past that changing the country of residency would display different self-risk and rental price amounts in the cheapest rental option available (as for some place of residency not having some basic insurance is not acceptable). That said, I already successfully rented a car with a different place of residency as the search engine. Usually the search engine will link you to a page to conclude the booking. On this page you can change the residency. You could likely search as US or Canadian resident and book it as a Spanish resident. Sometimes the rental agency will also let you change those details when picking up the car. If you can't book...
Full answer by André: https://travel.stackexchange.com/a/200058 (CC BY-SA 4.0).
Need it done for your business? UphillTech.