So I remember in high school when discussing Spain's colonial empire that "They didn't really understand the concept of supply and demand back then, and that gold's value was significantly devalued by so much of being brought back to the mother country."
So why questions are as follows.
Was that much gold really brought back from the colonies?
Were people 'unaware' of supply and demand, and was gold devalued?
If so, did this have any negative impacts on the economy, or was it more gold = good even if it's worth less?
It wasn't gold, it was 50,000 tons of silver until Brazil's gold strikes in the 1690s. Until then gold barely made an impact, and Europe's currencies remained solidly silver-based. It wasn't gold but silver that became devalued as it went from worth around a tenth to a fifteenth of its weight in the lesser metal.
An understanding of the impact started to develop even in the 16th century amid the associated five- or six-fold rise in prices (stimulated initially by central Europe's own silver output), but was overall of secondary concern to the undoubted prosperity that accompanied the shiny goodness.
Broadly, more silver was good. Gold became so too, but had to wait its turn until it became a serious contender from the 18th century. New strikes later for long became less abundant, fuelling price instability and feeding into successive depressions culminating in the 1930s. All that glitters may ultimately not be worth the trouble.
As the other commenter mentioned, the big original thing brought out was Silver. I remember reading a few key facts about how things changed because of the incoming resources:
The cost was pretty large to keep silver flowing and the long and transportation route and shady accounting meant a decent amount was being siphoned off
Silver was devalued
Surprisingly, the economic impact was truly global and a lot of tge Silver ended up in Asia, especially China
Despite how much was being spent, 'lost', or not accounted for in the first place, I believe the mines were run until they were.... difficult to continue running eveb after a change or two in the techniques used for acquisition, so to answer your third question it was pretty worthwhile even after the world economy was permanently changed
The Silver created some extremely opulent and yet relatively 'lawless' settlements along the route, a great example of how a decent portion of what was being mined, spent, and causing a reduction in value wasn't directly helping out Spain who was paying a massive amount of money for their navy and what not