Tried it. More trouble than it's worth. First time it rains it'll short out the exposed connections. And you'll go through cords pretty often, if not needing to replace USB batteries too if the ports are buggered.
For a more permanent setup you might try to weatherproof the cable and USB battery, and provide some form of strain resistance to make the USB ports last longer.
Rechargeable lights can take a lot of heat. Heck, some of them get pretty warm in normal operation. I wouldn't worry about heat in a car as long as it's a reputable light manufacturer like Light & Motion, NiteRider, Cygolite, Serfas, etc. I wouldn't trust the dozens or hundreds of generic lights using cheap battery packs made in China. There are too many reports of battery failures. There are good batteries and packs made in China, but they won't be the cheapest.
But if you want to avoid rechargeable batteries, get a
Serfas SL-255. It's the lowest priced dedicated bike light that takes regular batteries (it uses two AA's) and is bright enough to be useful. There are cheaper light that use AA or AAA batteries, but they're too dim to be useful. The next step up would be the Busch and Muller Ixon IQ and IQ Premium, which use four AA batteries and cost more.
I've had a Serfas SL-255 for almost three years and it works great. It's mostly a backup light or errand bike light now. But for a year it was my main headlight. The beam is a bit narrow, more of a spotlight. And the 255 lumen maximum brightness is about as low as you'd want to go -- although I've managed with dimmer lights for 10 mile nighttime city and suburban rides at 8-10 mph.