As your wife will be a UK state pensioner, she will be able to apply for an S1 form for herself and can also request one for you as her dependent (she has to do this, you can't apply yourself). That will enable both of you to receive treatment in the Spanish public healthcare system which is generally very good. When you reach state pension age you would then need to apply for a new S1 in your own right.