Starting about 406 A.D. Spain was invaded by Germanic peoples (Vandals, Sueves, Alans, Goths, Visagoths, etc.) and eventually established a monarchy that ruled the Iberian peoples of Spain.
Roderic, a Visagoth, was the of the Gothic kings to rule in Spain. He was defeated and killed by the invading Moors around 710 AD. Due to the conquest by the Muslim Moors there was a nostalgic remembrance of the Gothic rule that is still part of Spanish culture.
To this day in Spain there are blue eyed, blond hair descendants of the Visigoths. Tracing ancestry back to Visigoths is very prestigious in Spain; something like in America having an ancestor that was on the Mayflower.
Hence the term "blue blood" in Spain refers to what is perceived as the (rightful) former ruling class that was displaced by the Moors.