The short answer: with polyurethane foam, effectively forever. Here's what determines longevity — and what doesn't.
Polyurethane foam is chemically inert and waterproof. It doesn't absorb moisture, doesn't break down in soil, and doesn't shrink over time — the same reason it's used as structural fill beneath highways and airport runways.
That said, lifting only addresses the void that existed at the time of the repair. If a downspout keeps dumping water against the foundation, or a broken drain line keeps eroding soil, a new void can form somewhere else. Fix the cause and the fix lasts.
Every reputable concrete leveling contractor will back their work with a written warranty. Read the terms — the length and what's covered — before signing.