As you stated, it works even if you don´t clear the flags SPIF and WCEF, but it surely won´t work for many SPI chained transfers, since you need to wait for the signals to be finished using:
while (!(MCF_QSPI_QIR & MCF_QSPI_QIR_SPIF));
So, if you don´t clear at least SPIF, it will remain set and on the next SPI signaling round, when you try to wait for signals to be finished using the line above, the while will imediately return causing the exact behavior you were having before, eg, QSPI command RAM will be overwritten by the other commands before the older commands are executed. Probably WCEF will be set at this time, indicating your firmware overwrote a command RAM position while the current command was being executed.
Regards