If hard constrained by price, I'd get the M2. The storage can upgraded with a portable drive easily enough later, while the M3 has 8GB forever... though it would have to be the 10-core GPU option, since the store doesn't let you order the lower-end one anymore, and even if it did, if it's like the M3, adding 16GB automatically bumps the GPU, so the suggested option might not even exist.
Your M3 option weird, with the bumped GPU, but without the bumped RAM. It's an option I can't see many people choosing, but I guess you've got your hard limit.
Why not the M1? The M1 was a 2020 machine. Apple typically supports machines for 7 years, meaning the M1, while having enough CPU power for most tasks, would lose support in just 3 years. I'm not dropping much on a machine at the tail end of support. The M2 still has a fair number of years left. The M1 will have you wanting a replacement sooner, not due to lack of performance, but for OS support, and end up costing you more in the end.
Without the price constraint being as hard, my daughter picked up the education store M3 Air 16/512 for CAD$150 more than the education store has the M2 Air 16/512. I'd say CAD$150 for is worthwhile for an extra 2 years of support, a bump in CPU performance, and a much improved GPU, so in the real world, I'd actually recommend that.
I was trying to get everything centered around a single, minimal price. One can always (well usually) get more for more and then the value of money differs among people. However, fixing the price then forces us to make the hard choices across different dimensions.
In this case the M2 configuration above priced out at $1200 in the US store. The M3 configuration would have priced at $1100 without the GPU bump but 16GB of RAM (which also now seems to include 2 GPU) would have taken it to $1300 so I "spent" the extra $100 on just 2 GPU. The choice also doubles-down on the theme of a processor-intense configuration.
Note the question was truly hypothetical. I have a MacBook Air 2020 w/i3 and 16GB of RAM and no plans to replace. It works great for my needs. A family member has a MacBook Air w/M1 and 16GB of RAM. More than fine for her studies. Well she runs short with the 256GB SSD but that's because of all the Sims mods she loads not what she actually needs to do...