This has always fascinated me, as Spain was an established global empire that had the vast riches of the Aztecs, Mayans and the Inca empires, yet it somehow managed to be incapable of managing its finances to the point of being bankrupt.
See this thread by u/mikedash as we await newer replies.