I'm confident that Glock will be around in 20 years—they've been making pistols for 25 years already and as noted up-thread there have been so many sold so far that they've probably achieved "critical mass" market share similar to other manufacturers like SIG or Beretta.
I don't think that competition from other "tupperware" guns will affect Glock sales that much—I don't think the polymer frame is that much of a reason why shooters select the Glock. Accuracy, reliability, value for money, a nice l-o-w bore axis all account for it as well (for me, as a competitive shooter—I'd prefer if it was all-steel, to be honest, to give more resistance to recoil). The polymer frame helps keep manufacturing costs low (after the initial development of the frame manufacturing equipment) so I'd say it's certainly an advantage to the manufacturer, and for folks that can pack, the low weight is not a bad feature either.
One thing that does present some concern about Glock's long-term viability is that their handguns are, more or less, the same basic design which leaves them more open to the whims of the marketplace than manufacturers that have a broader spectrum of offerings. It's like a monoculture forest (i.e. only one species of tree)—they're very susceptible to one type of parasite or disease wiping out the whole forest. For Glock, I'd really like to see them branch out to other types of firearms—the much-speculated Glock carbine would be a nice addition. Something along the lines (not design-wise, but functionality-wise) of a Cx4 Storm or Ruger PC9 that took Glock mags would be very appealing, or even maybe a carbine in 5.56mm or a line of shotguns. If these could be priced below $1000 Cdn and have quality comparable to their handguns I think they'd sell a ton of them plus help broaden their product line and increase their base.