Can different gauges of wire be used on the same circuit?
It is fine for the 15 amp circuits, but not for the 20 amp circuits.
The National Electrical Code requires circuits protected by a 20 amp circuit breaker to use #12 AWG copper wire throughout the circuit.
The National Electrical Code allows circuits protected by a 15 amp circuit breaker to use #12 AWG copper wire but #14 AWG wire cannot be protected by anything larger than a 15 amp breaker for power and lighting.
Regardless of where it is in the circuit, even if it is after the first receptacle, #14 wire cannot be used on a power or lighting circuit protected by a 20 amp breaker.
The following are pertinent excerpts from articles of the National Electrical Code:

210.20(B) Conductor Protection.  Conductors shall be protected in accordance with 240.4.
240.4(D) Small Conductors.  Unless specifically permitted in 240.4(E) or (G), the overcurrent protection shall not exceed that required by (D)(1) through (D)(7) after any correction factors for ambient temperature and number of conductors have been applied.
...
(3) 14 AWG Copper.  15 amperes
...
(5) 12 AWG Copper. 20 amperes

The #14 wire that is installed on 20 amp circuits would need to be replaced with #12 or the breaker on that circuit needs to be replaced by a 15 amp breaker.
Usually, 20 amp circuits are used for receptacle circuits and 15 amp circuits are used for lighting circuits.
Good luck!