You can do that and that's one of the big appeals. You can serve bost JXL and JPEG from the same source and you8 can actually serve downscaled versions of the JXL image from the original bytestream.
Also OP did say "transcode on the fly" to serve JPEG, not actually storing as JPEG.