I think that, if you can find it at a good price, it definitely is worth it… but only if you don’t mind the old design, and you don’t want to spend a lot.
OP, you say you want a basic iPad, that the 10th gen is too expensive, and at the same time longevity. Well, if you really want to invest on a long term device I would get an iPad Air 5th gen, or even better, a refurbished iPad Pro from 2021 (the one with the M1), because those devices offer a computer-level performance and 8GB of RAM.
But I’m going to assume that you are not willing to spend such money. Then my answer remains the same: the 9th gen iPad is a great value, and a great device. If you think you’ll need 256GB because long term, then look for a sale, depending on what you do, the 64GB model can become a bit tight. But only you can decide this.
Look, I have a 9th gen iPad in home, along with my M2 iPad Pro. I’m not going to compare their raw power because that would be pointless, but for a machine with just an A13, battery, and a screen, is a great device.
My iPad 9 is still on iPad OS 15.7, it runs flawlessly, fast (although without pro-Motion) and smooth. My intention is to update it to 16.5.1 or 16.6, and as far as I know, it runs pretty well.
Taking into account that the iPad 6th gen still supports iPadOS 17, I can see this iPad having support until iPadOS 20 (included). But I wouldn’t worry about it because even if just receives updates for two more years, the iPadOS system is pretty complete and if you enjoy the current multitasking and features, you probably don’t need much more.
Whether you want to browse the web, create Office/iWork documents, play Arcade games, listen to music, read eBooks and Magazines or watch Netflix/Prime/HBO, and do it at the minimum price, this is your device.