I really don't like being pessimistic, but without pictures or better description, its better to take a pessimistic view. It's hard to say what kind of nails were used 27 years ago. They could be ring-shank with washers (which I doubt, or they would not have pulled out so bad) or simply old fashioned large head roof nails. They say a modern metal roof should be good for 50 years, but if it was just galvanized sheet metal nailed with roofing nails without washers, and without the hole protected from corrosion, you might just tighten or replace whats lifted and paint the entire roof with elastomeric paint to seal the corrosion that has probably taken place. If panels are too badly corroded, they may need replacing, and if too many need replacing, consider a new roof. If you are considering insulating, think about spraying foam on the inside or as a new roof coating (That requires painting every few years as the UV will damage the foam over time.)