What to do with unused opamp inputs in STM32L4?
Your question doesn't make sense since the opamp is in an MCU. All that stuff has been taken care of for you by the MCU designers.

Just because an MCU pin is labelled as an opamp input doesn't mean it goes only to the op-amp nor does it mean it's actually connected to the opamp if you set the opamp input to be connected to something else (like an internal reference). 

Same goes for pins labelled ADC or any peripheral.

If you don't need something on a pin, just don't configure that pin to be that thing. If you don't need an ADC channel, don't enable it.

By default you can just set it to be a GPIO output and set it to a known value if the pin is left disconnected on the PCB, just like most any other unused MCU pin...though they are usually set to be inputs on power-up just so they don't fry something or themselves.