The most obvious factor seems that the Spanish South and Middle American domains were settlement colonies, whereas the Philippines was an exploitation colony with mostly indirect rule using local leaders.
This difference in scope of colonization can be seen in the relative size of the Spanish population compared to the indigenous people. See the relevant wikipedia page for a well sourced overview. Whereas South and Middle American countries have significant populations of Spanish origin (10-90% depending on definition and counting method), the Philippines have a very low ethnic Spanish population (around 3%, although there is high uncertainty in that number).
In effect the reason why most of South and Middle America speak Spanish is that the people there are mostly Spanish. Even though the native Indian populace remain to a much greater degree than in North America, and their languages are still spoken, they are not dominant.
Now it could have been possible that Spanish had remained as an official (and unifying) language for the Philippines, as is English in India (also an exploitation colony). But the fact that the United States ousted the Spanish, means that English also fills that role in Philippines.
As other commenters have noted, the transfer of a Spanish (Castilian) speaking population to the Americas was disproportionately higher than in the Philippines. However, their explanations are unfortunately pat, in that they describe the situation as one population moving in to barren ground where the indigenous population had disappeared entirely. Contrary to this, J. H. Elliott writes, "In 1789, five years before [Henry] Knox’s comment on the “utter extirpation” of the Indians of British America, Spain’s American colonies contained eight million Indians and one million mestizos in an estimated total population of fourteen million" (150). This is to say that the indigenous population in Spanish America was still massive and, significantly, there was also a burgeoning class of mestizos who naturally spoke both the indigenous language of their mothers and were educated in Castilian.
The reason this is important is that the story of Castilian spreading in the Americas is one of slow diffusion up until the colonies sought independence from Spain. As one commenter noted below, the religious Orders studied the indigenous languages and produced a huge library of indigenous language literature to support their evangelical efforts. This placed them in a privileged position as necessary intermediaries between local indigenous groups and the Spanish state. But even certain indigenous languages such as Nahuatl, Quechua, Aymara, and Guaraní -- called the lenguas generales -- spread more than Spanish in the first two centuries of colonization. This was because it was rightly believed that it would be easier for Amerindians to learn languages more closely related to their own. Thus, the Spanish state interacted with huge segments of its New World vassal communities through indigenous languages, even if it did occasionally try to promote the use of Castilian (efforts that were often disregarded by the religious Orders, who wanted to maintain their privilege).
Ostler writes, "It is no coincidence that Nahuatl, with many other ancestral languages of Mexico, largely disappeared from written use towards the end of the eighteenth century, just when political movements led by urban Spanish speakers were raising consciousness of Mexico as a separate country with a view to independence. The contrast between Spanish-speaking mestizos and ‘Indians’ speaking the ancient languages of Mexico was seen as a distraction from the emergence of the identity of the true Mexican. The older languages, seen as ‘backward’, had to go" (Empires of the Word 17). The success of Castilian in the Americas, then, can be traced to the existence of a large mestizo population that was one of the principal agents in the independence movement who, upon achieving separation from the empire, reorganized education in order to consolidate their new states under one language. It is not simply that the Castilian-speaking population out-weighed the indigenous language communities, but rather that the mestizos (because of their previous marginalization in the imperial order) were primarily responsible for independence movements and subsequently sought to dismantle the multi-lingual situation in order to consolidate power.
Elliott, J.H. Spain, Europe, and the Wider World, 1500-1800. New Haven: Yale, 2009.
Ostler, Nicholas. Empires of the Word: A Language History of the World. New York: Harper Perennial, 2005. Print.
Adding to /u/henkiedepenkie 's answer, population shifts should be considered, too. The native population in the Americas suffered as Europeans came to the continent.
http://en.wikipedia.org/wiki/Population_history_of_indigenous_peoples_of_the_Americas http://www.hist.umn.edu/~rmccaa/mxpoprev/cambridg3.htm
Some relevant numbers to consider: the native American population at the time of Colombus' first trip in 1492 was estimated to be around 30-55 million. According to some estimates, 90% of this population had died by 1650, from various reasons. Looking to today, this is consistent with the high percentage of people who claim Spanish heritage.
Unfortunately I am not familiar with the history Philippines, so I won't speculate. However, I can share that the Spanish trade route to the Philippines goes through Acapulco, or Panama, or Lima. So the Philippines was literally the farthest flung part of the Spanish Empire, unless you count the brief period when Portugal was in personal union with Spain.
Finally, the Americas were initially colonized with the intention of producing goods, metals, valuables, to be shipped back to Europe. Whereas the Philippines was used as a gateway to trade with China and East / SE Asia. Hence the Manila Galleons were known as "La Nao de la China".