This question mostly focuses on whether acquiring Portugal's colonies helped in alleviating the loss of wealth from the Dutch revolt in the Eighty Years' War or only further stretched Spain to its limits.
/u/firenze1476
Good question. I assume that by "Spain" you mean "The Spanish Crown". The answer is then a resounding no. There are several reasons for this.
The reality of Portugal in 1580
The Portuguese did have an early start in Europe's expansion into Asia, they were always the weaker power on the peninsula, in particular after their loss in the War of Castilian Succession that saw the rise of Isabella as Queen of Castile. This is reflected in the Treaty of Tordesillas, which in reality was a bad deal for the Portuguese. Nonetheless, they were able to set up two key maritime routes: the eastern one around Africa to Asia, and the western one to Brazil.
The eastern route, while initially providing great riches and wealth, declined over time. There are several reasons for this.
Until the 1570s it was a monopoly of the King of Portugal. The Crown controlled all the expeditions, by hiring ships and captains and crews; the Crown allowed only a small amount of private trade. This meant little initiative and severe limits on expansion. Until the 1630s, they averaged only outgoing seven vessels and four returning vessels per year. The Crown itself, despite the additional income, was strapped for cash, especially by the 1550s, so they relied on the Feitoria in the Low Countries to obtain financing and distribute their goods.
The journey to India was simply arduous. Between disease, storms, shipwrecks, delays due to shifting winds, and other maladies, the attrition rate was 40%. That's why they averaged seven outgoing vessels but only four returning vessels. This in turn meant that Portuguese presence in Asia was always very limited.
The Portuguese never could control the flow of trade in the way they wanted to. There was an oversupply of spices on their ports and trading routes, while they weren't able to suppress the Red Sea trade that continued to provide competition through their arch-nemesis in trade, namely the Venetians.
Thus, even if the Portuguese route to Asia is a storied one, over time Portuguese elites and merchants depended more and more on the western route to Brazil. It was set up as a contract system that allowed private investments to foster growth, with the Crown extracting revenue through customs duties.
The reality of the Iberian Union
Many pop-history books simply say that Philip II had coveted the Portuguese Crown and simply took advantage of the demise of Sebastian as soon as he could. This is simply misleading. Philip II had warned Sebastian against his crusading plans and wanted him to give up on his dream of invading north Africa. When Sebastian perished in battle, even as many Spanish courtiers greeted the news with rejoicing, Philip II astutely said little and did nothing as Cardinal Henry succeeded his perished nephew as King of Portugal. However, as other contenders for the Portuguese Crown emerged, Philip started to build support for his own candidacy, lest it falls to an unfriendly pretender.
At first it appeared Philip was going to assert his claims in Portugal through the same means he did in the Low Countries, by sending the infamous Duke of Alba as commander of his army -- this set up expectation of another iron-fisted subjugation. Yet, learning his lessons from the Low Countries, Philip followed the advice of Cardinal Granvelle; he waited just across the border and went into Portugal as soon as it was deemed sufficiently safe, to impress his new subjects with his personal presence as soon as possible. He negotiated an agreement favorable to the Portuguese nobility, and even stayed in Lisbon in person for two years. At the 1581 Portuguese Cortes in Tomar, he swore an oath to uphold the laws and customs of Portugal, and set it up as an autonomous state within his empire. Importantly, matters of finance and trade were kept separate, as it had been previously.
All the above meant little-to-no consolidation between Spain and Portugal's trading routes, which were still limited by Tordesillas, and no change in the separate Crown revenues. Overall, Castile continued to bear the brunt of costs in the maintenance of Philip's empire, as it had been since the days of Charles V, either through warfare or otherwise. So on one hand, the Cortes of Castile benefited from the Spanish colonies in the Americas, but on the other hand they bore the weight of the empire.
Re-balancing of empires
Of course, one of the major impact of the Iberian union is that Philip's political edicts now also extend to Portugal and her empire. This meant, of course, ban on Dutch trade, especially after 1590. The Dutch, who had invested quite heavily in Brazil, and had been key players in distribution of spices from Asia into northern and central Europe, fought the Portuguese in all fronts.
The outcome of Dutch incursions was predictable. The Portuguese insisted that their sovereign use his resources to re-gain their footing both in Brazil and Asia, however unsurprisingly they were much more successful in Brazil. The expeditions to Brazil, a joint operation between the Spanish and the Portuguese, was largely financed by Castilian money.
This itself became a sore point under the government of Philip IV, leading the Count-Duke Olivares to propose the Union of Arms such that every Iberian state contribute their fair share to the security of the empire, if not the peninsula. Over time, this led to the Portuguese rebellion and eventual restoration.
TL;DR
All in all, as far as the Spanish Crown was concerned, the Iberian Union was a drain on resources. This is due to how the Union was set up (there was little-to-nothing actually united), and increasing competition everywhere.
Want to learn more? Oof .... you have to look in several places, starting with Elliott's Imperial Spain, and then Kamen's The Road to Empire, and finally Parker's The Imprudent King. You also should look at Tracy's edited collection of essays The Rise of Merchant Empires to be able to compare all sides of the burgeoning global trade.