Spain now had way more wealth the its neighbors, relatively speaking, even if it didn't have more wealth than before. In a world of mercenary armies and continental trade, that matters a lot. Sure, maybe the mercenaries are now asking for double what they asked before, but they're asking your neighbors for double too, and your neighbors didn't also get a huge injection of gold.
Also, gold wasn't used to build things, so it contributes very little to wealth (jewelery and decorations notwithstanding). Having a huge injection of iron or uranium or tritium or helium or lithium or other rare and sought-after elements today would be an entirely different story.
Of course, the whole idea of bringing an asteroid to earth to mine is pure sci-fi at this moment, so this is all moot.
Those resources already exist on earth, for which it'd be cheaper to just mine it out of the ground, than to spend the energy to bring ore back (then spend the same amount as earth mined ore to process!).
The one thing those asteroids have going for it is that it's already in space - so if you were planning on building a space station, space ship or something of that nature, you might be better off mining in space to produce the materials for it (and save the launch costs, for the one time cost of launching space mining and manufacturing plants).
The actual wealth in an economy is the value of goods and services. Money is not a good or a service. Increasing the amount of money does not change the value of goods and services, it just devalues the money (inflation).
As opposed to a lack of money being a friction that prevents a country from being wealthy?
It is very easy to point out how an economy with perfect information and perfect cooperation has zero demand for money, but reality works very differently.
I always laugh at the size of Smaug's gold hoard in the Hobbit movie. Unleashing even a fraction of it would make all the gold in Middle Earth worthless.