5. Nxe4 is necessary to recover the pawn.
Wikipedia has related information at Ruy_Lopez#Schliemann_Defence:_3...f5