Absolutely, ESPs are just microcontrollers. A Pi is a fully functional System-On-Chip. That being said the VPN is the only usecase you mention where you couldn't use a flavor of ESP.
Funny thing is that modern 3G/4G/5G modems are full System-On-Chip computers themselves supporting virtualization. The Qualcomm Snapdragon MSM8916 is a popular SoC used for LTE dongles that runs the modem Baseband Real-time OS and Debian/Android OS on the same CPU.
Connectivity can tilt towards RPi, you can do vpn, ipv6, mobile data (if you use a usb stick), ethernet etc.