In Spain, the health system is held in high regard.
The quality of staff, service, and equipment are outstanding. In general, non-EU retirees will not have access to the Spanish health care system and will have to take out private insurance.
Plus, if you move to Spain as an employee or are self-employed, the situation is different. You will pay social security contributions, and so you will be issued with a social security number entitling you to health care, sickness, and unemployment benefits, as well as government pensions.
For minor problems, take advantage of the excellent farmacias (pharmacies), where highly trained pharmacists will recommend advice and remedies, some of which require prescriptions back home.
Here you will find a more detailed insight on health care in Spain and a breakdown of which kind of health insurance policy you may need.