Installing new bathroom heater/fan combo which requires a dedicated 20amp circuit. I got that 12/2 wire ran direct to the breaker.... the problem is the fan that was existing had a switch that I was planning on reusing for this new one. Only it is 14/2 wire, is it ok to run from the junction box in the new heater/fan the main power which will be the 12/2 AND the 14/2 for the existing switch?
No, this is not OK. All the wire on the circuit must match or exceed the breaker size based on the type of circuit it is.
This is allowable, but since there is any 14 AWG wire, it is a 15A circuit.
That means you must use a 15A breaker.
In bathrooms, new work requires 20A circuits and special rules as to what else can be on a circuit that feeds bathroom receptacles. However, these "new work" rules apply only to new construction and serious remodels; certainly not a fan replacement.
By the way, if you were to replace the switch loop with 12/2, you must use 12/3 instead, to comply with the new rules requiring neutral to be provisioned to switches. it would be better to run even more conductors to control fan and heater separately, but 12/4 is the largest size of NM cable reasonably available. You can't run 2 cables because current can't go down one cable and come back the other.