My background is Filipino and I've always been rather fascinated with the seemingly disastrous economic development of the country, because it is the main reason why Filipinos began migrating en masse to other countries starting in the 1960s. However, this was not always the case, a lot of historical information indicate that the Philippines was a sort of economic and diplomatic hub at least from the 17th century up until the 1960s.
I've looked at economic data from the Maddison Project Database which attempts to find the historical GDP per capita of countries based on available records, as early as the medieval period. You can see that from the 1900s up to 1940 the highest GDP per capita in the Asia-Pacific region were Japan, followed by a close tie between the Philippines and Singapore. This means a generation of Filipinos grew up and lived at a time of relative prosperity, at least compared to its neighbours.
https://www.rug.nl/ggdc/historicaldevelopment/maddison/releases/maddison-project-database-2020
Then there is a sharp slow down of the GDP growth post-WWII. I've always believed that World War Two was disastrous for the Philippines, in terms of human lives lost, in the Philippines the Japanese invasion is sometimes called the Rape of Manila, and the amount of human capital lost was gruesome, to say the least, and the Philippines had the highest percentage of WWII casualties in Asia, just below Japan. Most Filipinos do not talk about World War Two, partly because Japan was officially pardoned in the 1950s, and partly because Filipinos who grew up during that period prefer to keep quiet about it. You'll often hear the Chinese, or the Koreans, talk about WWII often, but consider the fact that the Philippines had a higher percentage of casualties, and on top of that the complete destruction of the capital city, Manila, most people are completely unaware that Filipinos were slaughtered in World War Two.
And this also factors into economics. You can see such a sharp decline in growth in the GDP per capita of the Philippines right after World War Two. A lot of accounts shortly after post-WWII in the Philippines talks about the sharp decline of the quality of life. And it hasn't recovered, at all. And to be frank, I don't think the Philippines will ever recover to its pre-World War Two economic status, the geopolitical situation is so different now, and a lot of missteps were made by Philippine politicians. This is when Filipinos started migrated overseas en mass, and to be honest it's rather a humiliating fact.
Right, so what I'm familiar with is the scholarly thesis that the Philippines for much of its colonial life had a very weak central state apparatus, and that post-independence it was unable to wield that power effectively.
But let's go back to the 17th century as you said. You have to remember that the Philippine archipelago in itself was generally not a very profitable colony for Spain: it didn't have the spices of the Moluccas, and precious metals were not as abundant as they were in the American colonies. Instead, the main point of the Philippines was to serve as a gateway to the China market for the galleon trade. So during much of its colonial life under Spain, Manila was indeed one of the most diverse cities in the world, but the same could not be said for the areas outside the cities. Because of the constraints imposed by funneling manpower across the Pacific, in addition to the fact that not many Spaniards were interested in profiting of off anything outside the galleon trade, the Spanish secular bureaucracy in the countryside chronically remained understaffed and underdeveloped, effectively leaving the rest of the country to the influence of the friar orders. But eventually, that came to bite them back in the ass when the galleon trade stopped being profitable and they had to open Philippine ports to world trade, which created a mestizo middle class that became economically and ideologically independent from the Spanish elite.
Enter the Americans. The decision to subjugate the Philippines was somewhat unprecedented seeing as the USA was more concerned with its Caribbean holdings, and also wished to avoid taking on more of the immigration and ethnic diversity issues they were already going through. Similar to their colonial forbears, the Americans were chiefly interested in getting their slice of pie in the great carving-up of China that had already started earlier in the century, and were looking for foreign markets. (Initially, McKinley wanted to only retain Manila and the naval port of Cavite, then the island of Luzon, and then the rest of the country only when his generals advised him that the occupation of anything short of the entire archipelago would be militarily indefensible.)
In order to win the war and ensure the loyalty of the populace, the Americans invested a lot of money into building schools, sanitation, infrastructure and a civil service, all serving to develop the Philippines - but necessarily, in their image. The most controversial part of American rule was arguably the agricultural quotas to the US markets, especially the sugar quota. The Philippine landlord hacenderos had gotten rich of off cash crops like sugarcane, copra and abaca in the last century and were determined to keep their social status by lobbying for preferential trade treatment in US markets, which naturally drew the ire of US domestic producers. So concessions were made in the Payne-Aldrich Act and later in the Bell Trade Act and the Laurel-Langley Agreement: the United States would guarantee a set quota of purchased goods from the Philippines, but in return all US products would have to be imported to the Philippines duty-free. This had two dual effects: firstly, class stratification increased in the rural sectors, where the landowning class was clearly getting more out of the American deal than the underpaid and landless peasants working their fields. Secondly, Philippine domestic industry was necessarily crushed as cheap American manufactured goods flooded the market and stunted economic diversification. During the 1930s, a lot of peasant organizations began to spring up in the breadbasket of Central Luzon in resistance to impositions made by local landlords.
Now the American period is arguably where the whole "state" problem starts. The legacy of Spanish rule was an underdeveloped Philippine bureaucracy and fractured economy, which the Americans were determined to change mainly through the creation of a national congress to determine policy and a civil service. But the problem starts with how the Americans did their nation-building. In order to "prepare" the Filipinos for self-rule, the Americans let them vote in a gradual series of elections, starting from the municipality all the way until the Philippine Assembly. Taking after their own federal system, the Americans were very much focused on ensuring local representation before central authority. The inadvertent consequence of this was that landed interests essentially became a mainstay of central government. While American rule was able to grant the central government increased power and influence over the archipelago, the new elite looked on it as merely a "prize" to be won in elections and politicking. Imagine several unruly people fighting over a big stick - while theoretically the stick would be good for keeping people in line, it kind of loses its purpose when the person wielding it is themselves one of those unruly people. The plunder of the national treasury and the banks started during this era, as Filipino officials gave positions not necessarily to other competent officials but to loyal cronies. This is the first basis of the "captured-state" thesis. (Part 1/*)
EDIT: changed the part about machinery to a more accurate premise