How to force variable voltage fast charging power bank to output a certain voltage?
Let me first to sort out your project architecture.


You want to use a powerbank that has QC capability.
You want to use a L298N motor controller board as a secondary power supply, to convert input (9V preferrable) into 5 V, to power your Raspberry Pi controller board.
You are using USB-to-UART converter to get Rx/Tx interface (apparently to control the motor controller), from RPi USB port. Not sure why you are going through the extra bridge while Rpi has its own native UART.


So, you want to connect the Powerbank to L298N, and force PB to output 9 V, then the L298M will do whatever it is supposed to do, including 5 V power conversion to your RPi. In this configuration USB (nor Rx/TX) has nothing to do with the powerbank. 

To get 9 V out of QC2.0 powerbank, you would need to make a special board between the PowerBank and L298N board emulating a Qualcomm QuickCharge capable device. This board must have a USB receptacle with D+ and D-, and it should provide QuickCharge handshake to the PowerBank. Keep in mind that the QC will not only sense certain combination of DC voltages on D+ and D- as your reference picture shows (it would be too easy to accidentally invoke higher voltages), but there should be some preliminary signaling on D+D- wires, with certain timing. The details of QC protocol are not publicly disclosed, but you can search for ICs that provide the QC functionality, they will have some practical details on what a QC needs.

EXAMPLE (from TPS61088 datasheet and CHY100 datasheet)


A method to Enter QC2.0
According the description in the CHY100 datasheet, the processes to enter QC2.0 are:


− Apply a voltage between 0.325 V and 2 V to D+ for at least 1.25 seconds

− Discharge the D- voltage below 0.325 V for at least 1ms while keep the D+ voltage above 0.325 V

− Apply the voltage levels in Table 3 to set the output voltage. (must keep the D+ voltage above 0.325 V) 

Good luck.