In an ADC, Does UART baud rate affect signal transmission even if they are stored and retrieved from memory?
No way.

2 million samples of 12 bits (ADC resolution) each means 3 MBytes/second. One byte is transferred as 10 bits (8 bits data, 1 start bit, 1 stop bit), so you'd need 30 MBits/s transfer rate.

The STM32F401RE MCU on the board has a maximum APB2 clock frequency of 84 MHz. The maximal UART bitrate is 1/8 of the clock, that's 10.5 MBits/s.