There are some huge differences between the regions of the UK also. In England, the data from Public Health England for last week for all 315 districts shows only 2 have an infection rate greater than Spain's average of 60.2/100k persons, and 213 districts have an infection rate less than that of the Canary Islands and 15 of these having zero infection rates. So yes, it looks to me that the UK decisions are based on science/medical facts.
However clearly the UK position on quarantine is based on more than just the most recent infection rates, and probably includes the current trajectory of the rate. The UK rate has been about the same each week for the last 5 weeks, while Spain's has increased by a factor of 5 (from 10.6/100k for the period 20 June to 4 July, when it was comparable to the UK's, to today's figure of 60.2/100k.