Hello, Underestimate means that you thought something was going to be or do worse or less than it was. If you thought your football team was going to win the match, but they actually won, you could say "I underestimated the team's chances of winning." If you thought a candy bar costs $1 but it really costs $2, you could say "I underestimated the price of the candy bar."
To undermine means to lessen the effectiveness/power/ability. If a student did not listen to the teacher in class, the teacher could say, "Stop undermining my authority." Someone who cheats on a test is undermining their education. Undermine has a somewhat negative connotation.
Thank you! Kathleen