No one knows how long they will last and certainly , it will depend upon usage and storage . I would suspect a Glock or Sig Pro kept mostly in a safe with little exposure to UV and ozone and temp change will last pretty much indefinately . If someone wanted to keep a G17 as an heirloom I have no doubt that it will still be servicible in 100 years . Whether it will be legal to own in 100 years will probably be another matter .
Anti-polymer pistol people like to use the *disposable* arguement against poly guns but it's a red herring . Everyone could still easily function in a nostalgic world of : pre 1960 cars , dial in the test pattern to watch tube televisions and fly in DC-3's . It will be nice that there will still be 66 Mustangs , DC-3's and digital episodes of Andy Griffith to watch at whatever point in the future you'd choose , but I'd just as soon chose modern options for my day to day life .
* P-38 , BHP , M-1 carbine , M-1 Garand , K98 , Land Rover Series II A owner speaking .