I did not try it, but maybe it gives you an idea:
Create the necessary attributes and the attribute values.
Each product.template record also automatically creates a product.product record (variant), even if no variants are created explicitely. You may want to create a new product template with the corresponding variants , then go to the corresponding newly created product variants and export them to see the External ID of the corresponding product template and the fields for the attribute values .
Also export the product variants of the old product templates. Then in the product variant records replace the External ID of the product template with the External ID of the newly created product template, add the attribute fields and reimport the product variants. Then delete the automatically created product.product records of the new product template. Maybe it works.
But make a database backup before!