Has a Teensy 4 ever been space qualified or used in a space craft?

I think you may mean you are looking for Mil Spec 883 level B, which is the chip spec. common requested for all Military type activities. After over 30 years in the Aerospace World I found that most Aerospace companies used 883 Level B Chips and then did their own testing on those.
So to answer your question, your question should be to the manufacturer of the individual chips themselves, not PJRC. As I recall when I worked at Ball Aerospace they could not use CMOS devices (which removed a lot of CPU's from there choices) because of their sensitivity to various Cosmic Rays from space (Mostly Gamma). They only used NMOS devices as they were less sensitive to Cosmic Rays. Anyway that was over 30 yrs ago so many things have changed since them and Your Milage May Vary.
Not a direct answer to your question, but I have flown a handful of AVR chips. Nowhere near the T4 in terms of processing power (and also no challenge for thermal design, as they were very low power). No failures for ~1yr in LEO, though... I believe they got down to -40C at times. Might have had single-event type problems, but with watchdogs and error checking, we got consistent usable results.

Formal qualification for such a part is going to be cost-prohibitive, and kind of runs contrary to the concept of the Teensy. If you are serious about flying one, in addition to asking around (which is a great starting point), you can substantially derisk the design with some thermal vac. testing and possibly some SEU testing. Both will require you to have fairly refined hardware and firmware operational for the testing, and the latter will require considerable effort to plan and execute the test. But these can be done with costs comparable to standard acceptance testing. Most importantly, though, and where I can add some first-hand insight: start by procuring a large number of devices, sufficient for all potential test and flight needs, so that you won't wind up with parts from different batches or even foundries as the supply chain evolves.