UPDATE:
@Renon Steward's answer fixed the issue
Try open composer.json and remove use-include-path or the entire config element if this is the only entry.
"config": {
"use-include-path": true
},
use-include-path - Defaults to false. If true, the Composer autoloader will also look for classes in the PHP include path.
After alot of digging it seems to be a bug with magento and laminas framework (formerly known as Zend)
Some modules (alot of them) are still using Zend\… namespace. They are now replaced with Laminas\… namespace. To fix this issue, Laminas created a bridge composer module to add autoloads that create alias for everything Zend\… to Laminas\…
https://getlaminas.org/blog/2020-03-09-transferring-zf-to-laminas.html
This works very well... EXCEPT: the problem is it interferes with old zf1 classes still used by Magento.
For example, the code uses \Zend\Http\Client (PSR-4 ZF2)… composer autoload will return Zend_Http_Client (PSR-0 ZF1) When this occurs, the Laminas bridge autoload is cancelled and will not return Laminas\Http\Client
It will happen whenever a module is calling a Zend class that has similar autoload path in ZF1.
Another example here https://github.com/magepal/magento2-gmail-smtp-app/issues/168
For now, I'll stick to Magento 2.3.4-p2 upgrade