I can't find anything on line which confirms this, and I am trying to clarify it. Someone told me this morning that the arrangement is not an EU thing but a private one between UK and Spanish governments and thus not affected by UK leaving EU, and indeed I found this on the Expatica site which says that EEA members also benefit and I can't see us not being part at least of that:
Does anyone have any concrete info on this?EU/EEA/Swiss nationals
EU, EEA and Swiss nationals whom have reached retirement age in their home country are entitled to free health care in Spain. In order to qualify they must obtain a Form S1 (previously known as E121) from their country of residence. Acquiring this form prior to departure is advisable and will help simplify the registration process in Spain.