Just on that bit, I was reading yesterday in "Power and Plenty" that most of the gold actually stayed in the Americas to fuel a middle class.
I read O'Rourke in multiple courses in college, and it's a interesting situation. There was, both in Brazil and the spanish colonies, a considerable ammount of deception on part of the colonists towards the metropolis when it came to preserving the gold. A LOT of gold supposed to end in Spain and Portugal stayed right here in the Americas. That's probably more significant with the spanish case, since Gold was not found in Brazil until the dawn of the 18th century, much later.
But the preservation of considerble mineral wealth on the americas on purpose on part of the Metropolis? I don't remember ever reading about that, and it doens't seem very plausible. There was always negotiation between the crown and the viceroys, in order to mantain a ballance of power, maybe during the Bourbonic Reforms? Though, even then, it sounds very bizarre.
EDIT: It wouldn't have been during the Bourbonic reforms, these crushed corruption on the colonies hard, which upset the balance of power, which started a crisis on the Colony-motropolis relatioship, which led to the eventual collapse of the Spanish Empire on the New World. You wouldn't see gold being left here on purpose during the 18th century.
There's also the book 1493 which is excellent if you're interested!
That one I did not read.