A PDE approach to finite time indicators in Ergodic Theory