In order for your substitute teaching to qualify for PSLF, you’ll need to teach at a qualifying employer (government agency or non-profit), and work full-time (your employer’s definition, or 30 hours per week, whichever is greater).
If you work part-time, you can combine simultaneous employment with multiple employers to qualify for PSLF. Both employers must be qualifying employers, and the total hours worked must add up to at least 30 hours per week.