Honorius had lost effective control of the Iberian lands conquered by the Vandals and essentially offered lands that were no longer his to give in an attempt to stay the Visigothic attacks on Rome's Italian territories.
So I'll ask you again, how long were the Moors in Iberia?
...except that the vandals did not have a legitimate claim to Iberia and were only there for a few years. Only Rome did. So legally it was still Rome's to offer. The Vandal invasions of Spain began around 404 and was completely put down by 418 when the Visigoths pushed them across the mediterranean. There was also a Roman insurrection in 409 in Spain, put down successfully in 411. So at most there was a little more than a decade in which Spain was contested before the Visigothic cession, with Rome holding the legal claim to the territory throughout.
In fact, Roman rule never officially ended in Spain save for the transition of power to the Visigoths. The hereditary claim was transferred through Honorius' half-sister, who wed the Visigothic king Athaulf in 414.
to give in an attempt to stay the Visigothic attacks on Rome's Italian territories.
Wrong. The Visigothic attacks on Italian Rome were in 410 under Alaric the Great. Alaric died in 410 and the Visigothic crown passed through three successors within less than 5 years. Valia became king in 415, and openly supported Honorius' rule in Rome. By 418 the Visigoths were in Gaul, and the two empires were openly allied with each other.
And I'll answer again: Too long.