The rating agency cited modest fiscal consolidation, persistent medium-term challenges and Pemex as risks to the country's credit profile.