Yes, retirees with a resident visa are eligible to enroll in Seguro Popular, the healthcare option for non-working people. You may also be eligible to pay into the IMSS system.
"Your options would be to pay out of pocket for routine doctor visits & medications, as most do anyway, and to enroll in either IMSS or Seguro Popular, get established with them, and stay enrolled for emergency hospitalization in the public hospitals; a triaged, socialized system. IMSS has fees and will exclude previous conditions. Seguro Popular is usually free for seniors who rent, for example, and has no exclusions. Quality in the public systems can vary widely. Private care is excellent in the larger cities, often superior to the USA," described one expat.
Instituto Mexicano del Seguro Social (IMSS) is Mexico's Social Security Institute. If you are retired and wish to enroll in IMSS, you may be eligible to pay into the system. However, visa status (permanent resident visas are preferred, temporary resident visas are sometimes acceptable), pre-existing conditions and age are all factors in eligibility under IMSS. Expats typically pay $300-400 per year for IMSS coverage.
Seguro Popular (SP) is not typically recommended as the primary healthcare option for foreigners living in Mexico. But, some expats have found it to be life saver and fully understand that it comes with long waits, no-frill hospital stays and other challenges.