Yes, running in harsh conditions will train your body to run in those conditions.
They run marathons in Death Valley, so it’s possible to train your body to run in very extreme heat. You can lookup training guides for that to see what they go through.
I used to run at noon in the middle of Texas summer, but that was when I ran at noon year-round. My body was able to gradually adapt to the heat as the temperature gradually went up from spring to summer. But if I went out suddenly at noon now, my body would really struggle initially. I’d have to run slower and shorter for a while until I adapted.
I don’t know if hot weather jogging would be the best thing to increase overall endurance. You will increase your body’s cooling ability which will help when you run at other times, but I would expect it to be a minor benefit.