Slight misunderstanding of how the country paying for care actually works. UK does, indeed, invoice EU countries for treatment given to their nationals. In exactly the same way that EU countries bill the UK for treatment.
Non-EU citizens should be charged the full amount of their treatment, unless it is emergency treatment, either by insurance or money. If you are from Kenya and fall over and break your leg, for example, you will be treated free of charge in UK as that is the system in use there. I very much doubt if the same person in Spain would be left struggling as Spain also provides emergency treatment. Just a couple of years ago, medical staff in Spain went on protest marches when the government told them they couldn't treat illegal immigrants (mainly N Africans) and the Spanish government backed down on the provision of emergency treatment.
Where the system falls down (in UK) is the training given to reception staff at GP clinics. Hospitals now have finance departments to chase up bills (including the claiming from EU countries) but GP clinics just tend to ignore any claim and many don''t even know what an EHIC is. Here, in Spain, I have seen a receptionist at the A&E department telephone UK for a Brit who didn't have the EHIC card. UK faxed the entitlement over. A British receptionist would just shrug and allow the patient in.
I don't know about Spain (probably the same) but in UK being pregnant is classed as an emergency. Hence hospitals such as Hounslow and Slough having a huge number of women coming in to give birth, mainly from Africa after just getting off the plane at Heathrow. UK (and Spain) will not refuse to provide emergency treatment regardless of ability to pay. In the case of those giving birth, the airlines should be held accountable for allowing them to fly in their 3rd trimester (IMHO).
The other difference is access to the national health systems vary between the countries. UK has a residence based system and Spain a contribution based system. All you have to do in UK is show prove of residence (no official card, no official register there) by means of utility bill or whatever and you will be registered for free treatment on the NHS. In Spain, you have to show you have paid your equivalent of NI and social security to get access to the system. If you haven't, you have to have insurance, either provided by the state (as in the S1) or privately.
Both countries have a caring attitude to medical problems. It's just that UK gets taken for a mug and puts up with it.