Required insurance coverages are the biggest wild card, as well as perceived liability. I have seen anything from nothing, to an added insurance package, and even where you might prohibited from crossing into a certain country, at risk of invalidating any agreement (including your credit card based insurance). That is why you need to explain your plans to the rental agency. Between Spain and Portugal, there may be no issues, or they may vary by agency, just ask.
We used Avis in Portugal, but did not cross the border. We only used them because I could used a brokered rate from my company at the time.