Thanks all for very helpful advice. I now know what to do! I’m not going to appeal against Ireland’s decision to reject me as it seems I have no grounds to appeal and in any case it seems all dealings with Irish passport office are painfully slow. We are not ready for residency yet but in due course, when uk house is sold etc etc, we will apply and I now know I can apply as a spouse of EU resident.
I am now exploring what is involved in becoming a Spanish resident so any links to information that explain things clearly would be gratefully received.