Tim,
As Eddie and travis already mentioned, the windshield glass is sealed with a special butyl rubber sealant the makes the windshield a structural part of the vehicle to prevent the windshield from pushing out if the airbags deploy, as well as sealing out water leaks from the passenger compartment..
The rubber trim around the windshield is primarily just a trim piece to cover the edges of the windshield glass, the sealer, and the ugly seam between the glass and the windshield frame, however if water gets under the rubber trim, it can become trapped there and begin to cause rust around the edges of the windshield frame.
An auto-glass company can better judge if there is a potential problem, and it's not a major task or expense for an auto-glass shop to remove the old rubber trim around the windshield and replace it if needed....that would be my choice.
...Rich