The country's public school system used to be one of the best in Latin America, but under-investment has led to its decline.