SHORT ANSWER
Spanish policy was rooted in the tradition of setting up universities in conquered territories, accompanied by the aim of converting the local people to Catholicism in order to bind them to Spain through religious faith. The Spanish approach was quite different to that of any other European colonial power.
Portuguese policy on education in its colonies is difficult to summarize as it lacked consistency, but the most common theme was that educating local populations would lead to resistance to Portuguese rule. Thus, the few locals who were given an education had to be thoroughly 'indoctrinated' with Portuguese language and culture, something which they felt could only happen in Portugal itself.
DETAILED ANSWER
Spain
The founding of so many universities in their colonies not only set Spain apart from Portugal but also (in most cases) from the other European colonial powers.
Although both Spain and Portugal (usually, but not always) sought to spread their respective languages and cultures in their colonies, the aims were somewhat different. For example, in Mexico,
the Spaniards set out to educate the Indians to help them run the
empire.
Source: Cristina González and Funie Hsu, Education and Empire: Colonial Universities in Mexico, India and the United States
Thus, the Spanish saw educating the 'locals' as a way of strengthening their empire. To this end, they set up universities in their colonies. Following the reconquest of the Iberian peninsula from the Muslims, the Spanish had set up universities in towns like Sevilla and Osuna (among others). Thus, the Spanish
were accustomed to providing education to conquered populations, which
explains why they were so quick to establish universities in the
Americas.
Source: Cristina González and Funie Hsu
This policy was also applied to the Philippines, although (for practical reasons), teaching Spanish was not a priority and most instruction (at least outside of the universities) was via local languages. In the Philippines:
In essence, the Spanish educational system was meant to keep the natives faithful, in order to keep the Church's authority over the lives of the Indios (colonized Filipinos).
The first university in the Philippines was set up in 1611 and others followed. In 1863:
The implementation of [a] Royal Decree made the Philippines ... the first country in Asia which had a free and compulsory form of modern education, 10 years before the implementation in Japan.
Ultimately,
the reformed educational system gave Filipinos the opportunity to pursue higher learning, study liberal western ideas and develop valuable leadership skills. This gave birth to select group of enlightened individuals who call themselves as Ilustrados. The Ilustrados played a major role in the Philippine revolution against Spain.
This was precisely what the Portuguese had feared (as noted in the section below).
Portugal
Although the Portuguese record on establishing universities in their colonies was very poor, the British, French and Dutch were in no position to boast about their achievements either.
The Portuguese, whose education policy was in many ways a 'poor man's' version of French colonial education policy, were wary of creating an educated local elite who might challenge their authority, unless that elite thought the way the Portuguese did. The perceived best way to do this was
the policy of taking Africans to Portugal to be educated there and steeped in Portuguese culture. Jerome Miinzer reports that in Lisbon he saw. . . many negroes, who had been compelled by the King to practice the Christian religion and to learn to read and write Latin. . . . A short time ago the King sent to Sao Tome black priests whom he had had educated, from their childhood,
in Lisbon
Source: Eduardo de Sousa Ferreira, Portuguese colonialism in Africa: the end of an era
Although Portuguese policy from the start of the 20th century was 'assimilation to the national culture', in practice it discriminated against local peoples, as it had done pretty much from the beginning. Further, in Brazil at least, the
Portuguese reserved the status of "university" to the University of
Coimbra
so anyone wanting a university level education had to do it in Portugal (there is an exception - Macau had a university, established by Jesuits, from 1594 to 1792).
Further, Portugal saw some of its colonies as a way of dealing with widespread poverty back home; thousands of poor Portuguese were employed in the colonies, so there was (in their view) no real need to educate local populations. Even when the Portuguese did eventually give education a higher priority, they struggled to finance it (Portugal was the poorest of the European colonial powers). The limitations of the ambitions of Portuguese education policy are clearly illustrated by the Regulation of 1899
The purpose of Portuguese education in Africa, as outlined in the Regulation of 1899, was to prepare Africans for their future roles as peasants and artisans.
Other sources:
Tang Kwok-Chun & Mark Bray, Colonial models and the evolution of education systems: centralization and decentralization in Hong Kong and Maca
http://historyworldsome.blogspot.com/2013/12/portuguese-colonies-in-africa.html