Spain could not do that. They had a treaty with Portugal, the famous Treaty of Tordesillas, delimiting their respective spheres of influence by setting a line on a map 370 leagues West of the Canary Islands, with the lands to the West being Spain's affair, and the lands to the East of the line being Portugal's matter. I'll quote the treaty, as it is abundantly explicit:
That, whereas a certain controversy exists between the said lords, their constituents, as to what lands, of all those discovered in the ocean sea up to the present day, the date of this treaty, pertain to each one of the said parts respectively; therefore, for the sake of peace and concord, and for the preservation of the relationship and love of the said King of Portugal for the said King and Queen of Castile, Aragon, etc., it being the pleasure of their Highnesses, they, their said representatives, acting in their name and by virtue of their powers herein described, covenanted and agreed that a boundary or straight line be determined and drawn north and south, from pole to pole, on the said ocean sea, from the Arctic to the Antarctic pole. This boundary or line shall be drawn straight, as aforesaid, at a distance of three hundred and seventy leagues west of the Cape Verde Islands, being calculated by degrees, or by any other manner as may be considered the best and readiest, provided the distance shall be no greater than abovesaid. And all lands, both islands and mainlands, found and discovered already, or to be found and discovered hereafter, by the said King of Portugal and by his vessels on this side of the said line and bound determined as above, toward the east, in either north or south latitude, on the eastern side of the said bound provided the said bound is not crossed, shall belong to, and remain in the possession of, and pertain forever to, the said King of Portugal and his successors. And all other lands, both islands and mainlands, found or to be found hereafter, discovered or to be discovered hereafter, which have been discovered or shall be discovered by the said King and Queen of Castile, Aragon, etc., and by their vessels, on the western side of the said bound, determined as above, after having passed the said bound toward the west, in either its north or south latitude, shall belong to, and remain in the possession of, and pertain forever to, the said King and Queen of Castile, Leon, etc., and to their successors.
So, the matter was entirely settled in the year 1494, and Spain could have not established anything in India or China without violating the terms of the treaty, which would have resulted either in a casus belli or in voiding the treaty. Spain was interested in neither of those things, as it would affect their posessions in the Americas, opening the possibilities for Portuguese settlements there. Another clause is even more explicit on the matter of forbidding navigation:
Item, that said procurers promised and guaranteed by virtue of the said powers, that from today onwards shall the said King and Queen of Castile, and Leon, and Aragon, etc send no ships to the part of the line towards Levant as that part from the line hither remains for the King of Portugal and the Algarves etc, nor shall the King of Portugal and the Algarves send ships to the other part of the line thither that remains for the said lords King and Queen of Castile, and Aragon, etc.
Over time, the treaty was repeatedly violated, a matter on which I wrote here: