Easy. You preclear into USA then land at EWR like a domestic flight. You check your bags then go through security then US CBP then to your gate. Even though you are transiting in USA you still have to admitted into USA. Nexus might save you some time in lines for security and CBP but it doesn’t change any entry requirements.