If you want 100% of the performance of the iPad Pro M1, the mentioned iPad Air M1 (5th gen) does that at a lower price - especially if you check retailers like Best Buy where I found mine for under 400 bucks. I would not have bought it at the initial launch price of $599 as that is really close to the iPad Pro pricing and you are looking for something cheaper too.
The M1 Air has the benefit of having overkill performance that you likely won't use to the full extent - but you might in a couple years as software like Logic Pro receives updates, new features and new iPadOS versions will also place more demand on the hardware.
There is this rule of thumb that you should buy hardware for your current requirements and not for future proofing. I personally believe the M1 Air is an exception as it can be had for as low as $359 (though getting that might be hard since you want to make the purchase immediately...) and the M1 chip is such a jump over any other non-Pro iPad that it all but guarantees it will last you a long time. As in, you don't have to look at upgrading before 2030. (Which is around the time I'd expect software support to start running out.)
Otherwise I'd probably get a 4th gen iPad Air, but they sell for at least $300 used... and Apple sells them for $469 in their own refurb store. (As good as new - new housing, new battery.) So in my opinion a M1 Air on sale will be much more value for about the same price.
I would not get a 10th gen regular iPad - it is more expensive than the 4th gen Air and performance is identical. I would not get a 9th gen regular iPad as it uses an older chip and is relatively slow. I had the 9th gen myself and even though it is plenty fast for daily tasks like office and listening to music, and some people will run Logic Pro on it, it's got very little memory, 3GiB. This means once you are running Logic Pro, you won't want to multitask and switch to other apps, as just a single "pro" application will task that iPad to the fullest.
I use my iPads intensively and I can tell you the 9th gen reaches its limits so quick you will notice slowdowns. If your priority is saving money, the 9th gen might still suffice for you. Not everyone needs things to be blazing fast, I recognize that some would even say they don't notice any performance issues whatsoever. But unless money is the priority, at least a used 4th gen iPad Air would be my preference.
A 9th gen struggles today already - a 10th gen or 4th gen iPad Air will be fine for a couple years but don't expect it to last just as long as the M1 Air. I bought it for future proofing and expect performance to last beyond 2030. And since I plan to use it for so long, the bit of money I spend extra in the beginning matters less.