I want to follow up on a few things James and christulsa said in their last posts.
I'm an American who lived in Latin America for more than 25 years, in the 1980's and 90's and again from 2010 to 2015.
During the colonial period, the society was indeed segregated into "castes" with the Spanish-born at the top, followed by the locals of Spanish ancestry, then the indigenous peoples, followed by the slaves and at the bottom the mixed races, who had no legal status until the 1700's when the Bourbon monarchy took over from the Hapsburgs. To a certain degree, this system still exists, although altered by the fact that the countries are now independent and many received large scale European immigration in the 1800's and early to mid-1900's.
Catholicism was the only religion permitted in the Spanish colonies. After independence, freedom of religion was granted but the Catholic Church continued to receive favored status treatment. Catholicism was most heavily practiced by the well-to-do, the immigrants, the African origin communities, and the indigenous. The mixed-races had been locked out of the system for a couple of centuries, in many cases were unable to marry in the Church or baptize their children, and developed a syncretistic religion mixing pagan and superstitious elements with Catholic prayers and teachings.
The heavy influence of Enlightenment thinking and Freemasonry prevailed among the middle and professional classes, and today those are typically the people who have either become "Evangelicals" or simply irreligious.
The majority of Latin Americans are no longer peasants. Latin America is heavily urbanized, home to some of the world's largest cities, and in some countries a quarter or more of the population lives in the capital city. Just like everywhere else, urbanization has been accompanied by secularization and religious indifference. In some countries like Mexico, Colombia, Ecuador, and Peru, Catholicism is still the religion of the great majority (70% or more) and it's not unusual to see priests and nuns in the streets or for the social life to revolve around the local church. I lived in communities in the late 80's where the church bells rang three times a day for the Angelus.
The greatest problems Latin American Catholicism has had to face are the generalized ignorance of large sectors of the population which makes them susceptible to believing any novelty they hear on the radio or TV or from some anti-Catholic missionary, and the lack of vocations. The aggressively machista and strongly sexualized culture of those countries discourages in particular young men from entering the priesthood and all parts of Latin America have always had to rely on imported clergy to staff the churches. Up to the 1960's most of those priests came from Spain but there was also a push in the late 1950's and early 60's spearheaded in this country by Cardinal Cushing of Boston to supply American clergy. The Netherlands and Canada also contributed many priests as a response to John XXIII's call for wealthy countries to send 10% of their newly formed presbyters to Latin America.
Even before Vat II there was a dire shortage of clergy with many countries having only one priest per 3000 inhabitants. I lived for several years in a Central American department that until the 1940's had two priests covering an area the size of Rhode Island with 60,000 residents, and although later Jesuits from the American Western province were sent there, they were still not nearly enough to properly catechize and minister to the people.
What i observed is that in small and medium-sized towns where the inhabitants were mostly of either European, African or indigenous stock, the people stayed faithful to Catholicism and Catholic thinking pervades their imagination and actions. In large cities, it's mostly the older moneyed families who continue to adhere to the Church although since the early 2000's the Church there finally decided to react to the Evangelical phenomenon and began to sponsor adult education classes which have had a salutary effect. In the 80's and 90's few Catholics could defend their faith but now it's common to find middle class and professionals and even many in the poorer neighborhoods who understand and can explain to others basic Church teachings. I was a catechist at a small local church and attended a Bible class at a cathedral not far from my apartment, I served as godfather to three girls and sometimes attended their catechism classes as well and I sent my own daughter to a convent school and Catholic university and I can say that the quality of religious education has increased greatly in the past 30 some years.