Are these all fast chargers and/or wireless? I charged mine from 60 to 100 after setup using a 5w brick and it was fine, barely even warm.
If it’s a high speed fast charger, it could have been the combination of all the indexing and syncing from the setup combined with high temps from the amount of power drawn. If it’s a wireless charger, those are very inefficient and can generate a lot of heat, and if the brick doesn’t have good power management it could overheat the phone.
Alternatively, it could be a bug in the software that is causing a process to run continuously, resulting in overheating when combined with the added heat from charging. If that is the case, the best bet is to set the phone up as new to test if you get the same result. If you set it up as new and still have the issue, then the likeliest answer is that it’s defective hardware.