You are making an assumption that flywheel speed affects the foam ring exiting speed. That is not the case.
https://en.m.wikipedia.org/wiki/Friction
Coulomb's Law of Friction: Kinetic friction is independent of the sliding velocity.
Unless flywheel speed is limiting the foam ring speed, that is, foam ring speed is comparable to a flywheel speed, these two are independent.
If you want to optimize the foam ring speed to be as much as possible, you are better off to increase the pressure between the foam ring and flywheel. For example by making the gap smaller, so that the foam ring will deform more. Or using harder foam that resists deformation more.
Another option is to use high friction surface for a flywheel, such as rubber.
And another option is to use several accelerating flywheels in a row. Keeping in mind that they all need to be significantly faster than a foam ring.
And last option that I see that is almost impossible is to keep the flywheel speed equal to the foam ring speed. Static friction is usually two times less than dynamic friction, sliding friction. So if flywheel speeds up the same way as foam ring does, acceleration will be the highest possible.
Now lets try to make a formula for it.
Lets start with something well known, for example, a speed of a free falling stone dropped from a hight
v = sqrt(2*g*h)
v - speed
g - earth's acceleration, 9.81 m/s
h - height from which the stone was dropped from
sqrt - square root
https://fornoob.com/when-can-v-root-2gh-be-used-in-physics/
In our case we can adjust the formula to fit our need. We can replace the height with the path of acceleration. And g with foam's acceleration. Lile this:
v = sqrt(2*l*a)
l - length of path that the foam goes through accelerating. About equal to foam ring radius for each accelerating flywheel
a - rings acceleration
But we dont know the acceleration. We can replace 'a' with f/m
v = sqrt(2*l*f1/m)
f1 - accelerating force
m - how heavy the piece of foam is
We need to add a factor that would account for friction, to transform force that the ring Is accelerated with into force that ring can push out
v=sqrt(u*2*l*f2/m)
f2 - force that a foam can push back with when compressed
u - coefficient of dynamic friction between foam and flywheel. 0.5 for most ordinary items, 0.1 for oiled steel, 3 for best rubber for racing wheels and tarmat
We can also add a correction that about half of energy goes into ring spinning rather than forward motion
v=sqrt(u*2*l*f2/m/2)
Or
v=sqrt(u*l*f2/m)
This is assuming flywheel speed is significantly faster, at least two times, than foam exit velocity. If not, then foam ring exit velocity is about half of the flywheel speed.