Junction box with 12 and 14 guage wires
Having multiple circuits in one box as fine, as long as you don't cross the streams!
What you propose (i.e. having a 15A circuit share a box with a 20A circuit) is entirely fine and normal.  There is one thing you'll want to be careful about though, and that's not crossing the streams; while you'll need to connect all the grounding conductors together, you need to keep not only the hots, but their partner neutrals rigorously separate to avoid overloading neutral wires, tripping GFCIs and AFCIs, and spewing stray magnetic fields everywhere.
You'll also want to mark the wires as to which circuit they come from; they make labels designed for this purpose, even, if you want a professional-looking solution for that.