Avoiding discretization issues for nonlinear eigenvalue problems