JPEG compression benchmark on Cortex M4
I wonder if a MCU is enough for 2 fps.

STM32F7/H7 has a hardware jpeg compression peripheral that only takes 4 ms to compress a 640x480 image. However converting the image from RGB to the required YCbCr format takes ~60 ms at 400 MHz, equating to a total time of ~900 ms for converting 2816x1584. I expect an STM32F4 with encoding done purely in software would be much slower.

Do you know any comercial IC that encodes RAW RGB into JPEG? I guess I
could design an FPGA but it will be out of the scope of the scale of
the project.

I couldn't find any chips designed to do your specific format, but I did find several FPGA encoder cores. Here's one that claims 7.3 ms processing time for 640x480 with a 100 MHz clock, which equates to ~100 ms at 2816x1584.