I don't know why it would want to delete a payment processor type, but it did. I ended up clearing the civicrm cache again and running the upgrade again - this time with no issue.
The recent civi upgrade tries to disable some obsolete extensions during the process. This functionality was added in https://github.com/civicrm/civicrm-core/pull/13298
And from the comment posted at https://github.com/civicrm/civicrm-core/pull/13298#issuecomment-462961558, it seem it do provides a list of extensions that will be disabled.
The above error seems to be triggered when an extension related to payment processor type is disabled which in turn tries to remove the payment processor type attached to it.
Not completely sure, but this is what it seems from the backtrace shown.
UPDATE -it looks like there are 4 noted extensions which are checked by the above PR during the upgrade process.
If any of the extension is present on the site, it will try to disable them which throws the error on upgrade.
Note that none of these extensions are related to any payment processor.
So, it must be something in your DB which mismatches with the expected values resulting into this error. Would recommend disabling these extensions manually before starting an upgrade process.
I had a similar experience. Flushing cache didn't do it for me (I tried 'cv flush', too). Found this: https://github.com/ixiam/com.ixiam.payment.redsys/issues/24 and tried deleting the payment processor records in table civicrm_managed. Upgrade went ok after that. The records were for the iATS payment processor, which I had recently tested but am not actively using. It looks like they were recreated after the upgrade.