I’ve bought an M2 iPad Pro, and while I’m still not sure I’ll keep it or I’ll return it in favor of an M2 MacBook Air, I expect this two devices to get more than 5 years, ideally 10 but I guess Apple will keep the usual 7-8 years of support for macs… I really hope they don’t shorten the lifespan of this devices to 5 or 6 years of support.
And, yes, I expect all M1 and M2 powered devices to get the same years of support, regardless of being an iPad or a Mac.
M1 MacBooks were released in 2020, iPad Pros in 2021 and the iPad Air in 2022. I expect support will be dropped around the same time but the length of support varies depending on release date.