Hi,
Like with the characteristics/variants system, you can create a custom field of the table "item" and of the type "single dropdown" with two values configured in it, so that the customer can choose between virtual and physical.
Then you have the problematic of sending the voucher by email based on what is selected.
In that case, I would recommend to use HikaSerial's voucher system and the characteristic/variant system.
In the virtual voucher variant, you can select a serial pack of HikaSerial so that HikaSerial will automatically attach the voucher to the order confirmation email that is sent to the customer after the payment.