The last king recognized as such in the Iberian peninsula was king Alfonso VII of León & Castille in the 12th century.
It could be recognized first as a honorary title and if it would become formally recognized then the imperator totius Hispaniae would probably have to acknowledge that the Holy Roman Emperor as precedes him (even if 'Spain' de facto becomes much stronger and important, it has more to do with 'international order of precedence' among Christian princes). Now having the HRE, the Papacy and other Christian kings recognize this as a honorary title of the kings of 'Spain' will be somewhat easier than a recognition of a formal empire of Spain.
I do agree that an earlier unification would help.