Text this: Measurement-induced phase transition in state estimation of chaotic systems and the directed polymer