This paper studies the delay robustness problem for tracking control of second-order systems subject to unknown input delay and uncertain nonlinearity under PID control. The basic issue is to find the largest allowable input delay under PID control can achieve robust tracking in spite of the uncertain nonlinearity. First, the uncertain nonlinear delay system under PID control can be transferred into a delay system with time-varying uncertainty. Second, we develop the largest allowable time delay under fixed PID controller parameters by solving the generalized eigenvalue problem (GEVP). Third, a genetic algorithm (GA) is proposed to achieve the largest allowable delay and the corresponding PID parameters, which consists with the solutions under GEVP. The first-order uncertain nonlinear delay systems under PI control is investigated as well. Finally, two examples are given to show the effectiveness of the proposed method.