The prosecutors’ office in Madrid said that, according to a sexual consent law passed last year, Rubiales could face a fine or a prison sentence of one to four years if found guilty. The new law eliminated the difference between “sexual harassment” and “sexual assault,” sanctioning any unconsented sexual act.
So I don’t know about Spanish criminal law in particular, but in Germany the criminal code states that it’s generally only applicable for acts committed on German territory, but there are multiple exemptions for offences committed abroad „with specific domestic connection“. This includes so called „offences against sexual self-determination“ if the offender is a German national. I could imagine that Spain has a similar rule.
Update: Seems I was (mostly) right, but spanish law is even broader than that of germany in these cases.
https://www.un.org/en/ga/sixth/71/universal_jurisdiction/spain_e.pdf