Then when he says, when, therefore, he mentions the place from which he will come to them, saying: when, therefore, I shall have accomplished this, namely, ministering to the saints, and consigned to them this fruit, i.e., the alms of the gentiles, which is a fruit of their conversion: Israel is an abundant vine that yields its fruit (Hos 10:1); I shall come by you into Spain.
But the Apostle seems to be saying something false here; for there is no record of his ever being in Spain. For he had been arrested in Jerusalem and taken to Rome in chains, as it says in Acts 28, where he was killed a...long with Peter.
Some, therefore, say that as it says in Acts: and when we come to Rome, Paul was allowed to stay by himself with the soldier that guarded him (Acts 28:16), and later it says that he remained for two whole years in his dwelling; during that time, they say, he went to Spain.
But because this is not certain, it can be said better that the Apostle did not say something false, because he intended to do what he said. Consequently, his words must be understood as suggesting his intention and not a future event about which he was not certain. Hence he was not able to predict this except under the condition which James mentions: instead you ought to say, 'if the Lord wills' and 'if we shall live, we shall do this or that,' (Jas 4:15). And so the Apostle excuses himself in 2 Corinthians for not visiting them, as he had promised: was I vacillating when I wanted to do this? Do I make my plans like a worldly man, ready to say 'yes' and 'no' at once? (2 Cor 1:17). And so, since he failed to do from a just cause what he had promised, he declares himself immune from levity, carnality, and falseness.
And this is how Pope Gelasius resolves the question, as can be found in the Decretals: blessed Paul therefore should not be thought to deceive—God forbid!—or to show himself an adversary because, although he had promised to go to Spain, he did not fulfill that promise, being occupied by divine providence with more important matters. As far as his own will was concerned, he said in truth that he wanted to do it. But as regards the secrets of God's plan—which as a man he could not know, even though he was filled with the Spirit of God—he did not in fact do it, being prevented by the heavenly plan. For even though he had the prophetic spirit, not all things are revealed to the prophets, as is clear in 2 Kings, where Elijah says, her soul is in bitterness, and the Lord has concealed it from me, and has not told it to me (2 Kgs 4:27).
Source: Commentary on Romans