It's a contract whether written or verbal - and the city was responsible for what it agreed to do - to provide medical insurance for retirees until age 65.
One of the primary purposes of the collective bargaining agreement was to provide for the medical needs of an employee after retirement.