I know basically nothing about lens design, but who knows what sorts of pancakes are even going to be possible with a shorter distance in front of the sensor? Will focal lengths have to be longer? Shorter?
I know there is a 22mm EF-M pancake, and an EF-S 28mm pancake. so I'm going to WAG it as needing to be about 30-35mm, but, oddly enough they already have a non-pancake 35mm.
It's actually 22mm in EF-m and 24mm in EF-s. I have both. The 24mm EF-s and 40mm EF are externally indistinguishable from each other except for the lettering on the (very short) barrel. Just like the 40, the 24 EF-s punches way above it's weight class in terms of IQ. It's quite excellent for the money and focuses down to 6 inches. The 22mm EF-m is also very good optically, and not expensive. I doubt that Canon would have much problem making a pancake 40 RF at f/2.8. From what I've gathered about the 35mm IS STM in RF (which I also have) is most of the size is actually the image stab. They could easily add one more slider switch to switch the one control ring between manual focus or control ring on a 40 RF pancake. Both of the pancakes have minimal lens elements, and I doubt the back flange distance is really that much of an issue, otherwise, how would they make any long lens with even EF flange distance that could focus to infinity? If it were, then a 22mm EF-m pancake would be a real problem, and it's almost exactly the same length as the other two pancake primes. Heck, I'd even be OK with a prime that was 1/4 inch longer than the current pancake primes if they needed to do that. I just love the 40mm field of view on full frame and want a reasonably small and light prime with at least f/2.8