That is a fundamental question, but note: I never promoted to do that. Actually, I would do it only for good reasons, which do exist.
If you assume a Linux driver issue that can be exploited on the PVE host, OpnSense will not protect you. You can impede that somewhat by using passthru, where OpnSense itself drives the hardware, which could be useful for the WAN NIC. On the other hand that will undermine purposes such as Linux drivers often being more stable than FreeBSD ones, like for Realtek cards, where you would want to use virtio.
However, usually, you will have to reach the NIC via IP first and PVE does not have control over the network layer, such that your attacks must be crafted to reach the IP, but attack lower layers. Otherwise, the packets will not even get through to your system.
Most attacks aim at higher layers these days and you could argue that there are many more lower layer attacks which you cannot prevent. Think of Intel I226-LM adapters which allow for remote administration OUTSIDE anything your "machine" does by virtue of Intel vPro/AMT.
Note that the PVE interface itself is hidden "behind" OpnSense, on the logical LAN interface, which usually exists on a (virtual) bridge and is often reachable only from VMs behind OpnSense or internal clients. In the case of a cloud-hosted instance, you will probably allow access only through a VPN configured in OpnSense - at least I do it like that.
That way, the outside attack surface is small - and also, since OpnSense and all other instances are VMs in this case, I can always roll back to snapshots or backups.
Remember: there is no 100% security - this will always be a tradeoff.
If you assume a Linux driver issue that can be exploited on the PVE host, OpnSense will not protect you. You can impede that somewhat by using passthru, where OpnSense itself drives the hardware, which could be useful for the WAN NIC. On the other hand that will undermine purposes such as Linux drivers often being more stable than FreeBSD ones, like for Realtek cards, where you would want to use virtio.
However, usually, you will have to reach the NIC via IP first and PVE does not have control over the network layer, such that your attacks must be crafted to reach the IP, but attack lower layers. Otherwise, the packets will not even get through to your system.
Most attacks aim at higher layers these days and you could argue that there are many more lower layer attacks which you cannot prevent. Think of Intel I226-LM adapters which allow for remote administration OUTSIDE anything your "machine" does by virtue of Intel vPro/AMT.
Note that the PVE interface itself is hidden "behind" OpnSense, on the logical LAN interface, which usually exists on a (virtual) bridge and is often reachable only from VMs behind OpnSense or internal clients. In the case of a cloud-hosted instance, you will probably allow access only through a VPN configured in OpnSense - at least I do it like that.
That way, the outside attack surface is small - and also, since OpnSense and all other instances are VMs in this case, I can always roll back to snapshots or backups.
Remember: there is no 100% security - this will always be a tradeoff.
"