You cannot run PA20 as a digital input. Not only will the internal pullup interfere with USB enumeration, but USB data pins use differential signalling, and the expected voltage levels lie in the transition region for CMOS and TTL digital logic. Digital input buffers, especially CMOS, have a very high input impedance meaning that very little current is drawn from the external pin. But in the transition region, both NMOS and PMOS (or NFET/NPN and PFET/PNP) transistors are on, providing a low impedance path between power and ground rails and causing large currents and heating to occur in the digital input buffer. Signals connected to digital input pins must never remain in the threshold region for an extended time. (And if a synchronous signal is in the threshold region during a clock edge, metastability results, which has problems all its own).
The good news is that that pin has an analog input function. Activating that will disconnect the digital input buffer. Another alternative is to physically cut the trace between the USB data signal and pin PA20, which will avoid problems during reset when the pin configuration reverts to its default of digital input.
Unfortunately, running in this mode may have already damaged this portion of the microcontroller. Ideally you should verify the fix on a new board that hasn't been powered up before.