Cured polyurethane foam does not settle, slump, or lose its shape, so a correct install lasts as long as the framing it is bonded to. What shortens its life is sunlight, repeated wetting, or a bad install, not age.
More detail
Foam is a thermoset plastic: once the two components react, the result does not soften or break back down at household temperatures. That turns the lifespan question into a question about the conditions around it. Exposed to ultraviolet light, the surface yellows and crumbles over time, which is why exterior foam needs a coating and why foam left bare near a sunny pole barn gable or skylight should be covered. Soaked again and again by a roof leak or a wet crawl space, open-cell foam holds water against the wood it touches. Foam mixed off-ratio never finishes curing, which is a day-one defect rather than an aging problem. In Central Ohio the practical long-term threats are a roof that starts leaking years later above an unvented deck and a crawl space whose drainage fails; both are maintenance items, not foam failures. Material warranties and workmanship warranties are separate documents, and both belong in the closeout package.