The M2's not some black box at this point, and it's not a great choice for the return of the 27" iMac. If you look at the M1 compared to the A14, you can extrapolate the M2 from the A15 or maybe A16 depending on when it launches. You're looking at the 4 performance and 4 efficiency CPU cores, roughly double the GPU cores of the corresponding An SoC, and the same NPU, plus some extra goodies sprinkled through the uncore. But that's not ideal for driving a 5k iMac. I'm sure it could do the job, but going up the ladder some you'll get a processor far better suited for the task. And looking at the lineup the right SoC already exists with the M1 Pro. Plus with the continued existence of the Intel Mac mini we know Apple sees the hole too.
An M1 Pro would certainly fit within the current mini's thermal headroom. You might even be able to fit an M1 Max, but looking at the current lineup and extrapolating I don't see a price point between a theoretical M1 Max mini and the base Mac Studio. Looking at the 14" MBP the price jump from the low-end M1 Pro with 16 GB RAM to the full M1 Pro with 32 GB is $700. Meanwhile the price gap between a 16 GB M1 mini and a base Studio is "only" $900 (assuming equivalent SSD size to take that out of the equation). Unlike the M1 Pro/Max Apple doesn't ship anything that let your choose between an M1 and M1 Pro, so we have to guess at how much that jump will cost, but $200 minimum seems like a safe bet and it's probably higher. Which means that if you add in the upgrade cost of jumping from an M1 to an M1 Pro a maxed M1 Pro mini would end up costing MORE than the base configuration of the Studio. I'm guessing this is the reason they didn't stealth update the mini with an M1 Pro; they're waiting to introduce a new, smaller case with lower bill of materials that will allow a lower entry point and a straightforward climb up the pricing ladder that transitions straight into the Mac Studio (call it $1700-1800 from a 10 CPU/16 GPU M1 Pro mini with 32 GB of RAM and a 512 GB SSD, or whichever Mn processor we're on when this happens, I'm using M1 for simplicity).
You're gonna see the same math with the iMac. A "full" M1 24" iMac (8 CPU, 8 GPU, 16 GB RAM) is $1900. An M1 Mac mini with 16 GB RAM plus Studio Display is $2700 (call it $2900 when you add in keyboard and mouse) and a base Mac Studio with Studio Display is $3600 ($3800 with keyboard and mouse). While again I expect a redesigned mini to be less expensive it's still useful as a baseline point of comparison, even if the Studio is probably more helpful. So those are your starting points. Even if they're functionally identical I expect the iMac at worst to hit price parity with the equivalent separates and less expensive wouldn't surprise me. So that's the [massive] price range you're trying to fill in. There's plenty of room to take the 24" higher with an M1 Pro, which covers a lot of that space, but not all of it. I could easily see that being it with AIO being limited to a 24" screen and if you want bigger you need to go with separates. The presentation sure seemed to imply the 27" iMac is gone for good and with the new Mac Studio and Studio Display it's not really needed anymore. But then again Gurman still insists it's coming, even after today's event, and he knows his stuff. Plus Apple's website still refers to the 24" iMac, which is redundant unless there's another size to compare it to. So I'm working from the assumption that it'll be back even if that could easily be wrong. In that case you can use the Mac Studio at $3800 as a starting point. Knock off a few hundred bucks for AIO savings (but add some back to include the keyboard and mouse) and you've got a 27" iMac with a fused M1 Max at $3500. Go down the price ladder from a fused M1 Max to a fused M1 Pro with 16 GB RAM and you take $900 off the price, so now we're starting at $2600. Not far off from what we'd expect using the current mini as a price baseline. If you assume it's $300 to go from M1 to M1 Pro then a comparable 24" iMac would be $2200, so the bigger screen costs you $400. Don't remember what the price gap was back when both were Intel, but that seems like it's in the right ballpark. A little bit more massaging and I bet the numbers work almost perfectly.