‘Spain’ in the sense of ‘Hispania’, alluding to the Roman province, certainly existed as a concept at the time, even if the Kingdom didn’t (yet). Indeed, there’s several medieval Kings in the Iberian peninsula who used the title ‘Imperator totius Hispaniae’ (ie, ‘Emperor of all Spain’).
See, for example, the epitaph of Ferdinand I of Leon, who died in 1103:
H. E. TUMULATUS FERNANDUS MAGNUS REX TOTIUS HISPANIAE. FILIUS SANCTII REGIS PIRENAEORUM ET TOLOSAE. ISTA TRANSTULIT CORPORA. SANCTORUM IN LEGIONE BEATI ISIDORI ARCHIEPISCOPI AB HISPALI VICENTIIMARTYRIS AB ABELA. ET FECIT ECCLESIAM HANC LAPIDEAM. QUAE OLIM FUERAT LUTEA, HIC PRAELIANDO FECIT SIBI TRIBUTARIOS OMNES SARRACENOS HISPANIAE ET CEPIT COLIMBRIAM, LAMEGO, VESEO, ET ALIAS. ISTE VI CEPIT REGNA GARSIAE ET VEREMUDI. OBIIT VI K. JANUARII. ERA MCIII.
Here is buried Ferdinand the Great, king of all Spain, son of Sancho king of the Pyrenees and Toulouse. He transferred to León the holy bodies of Saint Isidore archbishop, from Seville, and of Vicente martyr, from Avila, and built this church of stone, which in another time was of mud. He made his tributaries, with arms, all the Saracens of Spain. He seized Coimbra, Lamego, Viseo and other places. He took by force the kingdoms of Garcia and Vermudo. He died on December 27, (the year) 1103.
Another example, Ferdinand III of Castile, who died in 1292 and is buried in Seville's Cathedral; note how "ESPAÑA" is already written in its modern form, not in Latin:
AQVI YAZE EL MVY ONDRADO HERNANDO, SEÑOR DE CASTIELLA E DE TOLEDO, E DE LEON, E DE GALICIA, DE SEVILLA, DE CORDOVA, DE MVRCIA, DE IHAEN, EL QVE CONQVISSO TODA ESPAÑA, EL MAS LEAL, EL MAS VERDADERO, EL MAS FRANCO, EL MAS ESFORZADO, EL MAS APVESTO, EL MAS GRANADO, EL MAS ZOFRIDO, EL MAS HOMILDOSO, EL QVE MAS TEMIE A DIOS, EL QVE MAS LE FACIE SERVICIO, EL QVE QVEBRANTO E DESTRVYO A TODOS SVS ENEMIGOS, EL QVE ALZO, E ONDRO TODOS SVS AMIGOS, E CONQVISSO LA CIVDAD DE SEVILLA, QVE ES CABEZA DE TODA ESPAÑA, E PASSO EN EL POSTRIMERO DIA DE MAYO, EN LA ERA DE MIL E CC. E NOVAENTA
Here lies the most noble Ferdinand, lord of Castile and of Toledo, and of Leon, and of Galicia, of Seville, of Cordoba, of Murcia, of Jaen, the one who conquered all Spain, the most loyal, the most true, the most frank, the most hardworking, the most handsome, the most distinguished, the most suffered, the most humble, the one who feared God most, who did Him most service, who broke and destroyed all his enemies, who raised up, and honored all his friends, and conquered the city of Seville, which is the head of all Spain, and passed on the last day of May, in the year of one thousand and two hundred and ninety.
So Spain being a concept in the 1500s shouldn’t be all that surprising.
In exactly the same way ‘Britain’ (ie, Britannia), and ‘Italy’ were also concepts, even though a Kingdom of Great Britain wouldn’t exist until 1707, and a unified Kingdom of Italy encompassing the entire peninsula wouldn’t exist until 1861/70.