I can't really imagine a scenario where you would be "stuck abroad" unless one of you contracted coronavirus AND then needed urgent hospitalisation.
If there was a major outbreak in an area of France or Spain you were visiting, presumably you'd leave that area and travel somewhere else, or homewards. I can't see that the UK would prevent its own nationals from re-entering UK, the worst case might be you'd have to quarantine at home for 14 days when you got back. Remember, the Channel tunnel kept operating all through the lockdown period.
I assume you will be checking if your travel insurance will cover you for coronavirus risks (ours now does - Insureandgo) but in any case if you take EHIC cards you should be good for any emergency treatment even if it's not completely free of charge.
We're off to France and Italy next week and not especially concerned - it's only the continent, not the moon.