I’ve taught elementary and middle school math. I taught elementary and middle school math.
Ideally speaking, the first simply states the fact that the teaching has happened, and the second implies a specific time in the past established earlier in the discourse.