You can set up the DMA for the longest expected message, then configure EXTI rising edge interrupt for rising nCS. In this ISR, you can read DMA NDTR (data remaining) to calculate actual received length, and reconfigure DMA/SPI as you wish, for the next transfer. Note that reconfiguring STM32 SPI in variable-length DMA case requires resetting the whole SPI peripheral through RCC reset register, it's the only way to empty the TXFIFO.
As STM32 SPI generates DMA request as soon as it's enabled, in some cases, you need to use a similar interrupt for falling nCS to start the DMA at that point, to get "recent enough" data in the SPI TXFIFO. In this case, make sure the slave asserts nCS early enough to allow some processing delay in the ISR, however, you can do the initialization pretty fast if you don't use the bloat libraries.