That makes the decision less about roofing than about tenure. If you expect to own the house for another twenty years or more, metal wins on arithmetic and you collect the difference slowly. If you might sell inside ten, you pay the whole premium and hand most of the benefit to the next owner, because buyers rarely price a roof at its remaining service life.
There are cases where the arithmetic stops mattering. In wildfire country a non-combustible roof can decide whether you can insure the house at all. Under heavy snow load, shedding matters more than cost per year. And on a complex roofline with many valleys and penetrations, metal detailing gets expensive fast, which narrows the gap from the wrong direction.
Everything below prices both options from the same national dataset, at the same quality tier, on the same roof.