NEW DELHI—After suffering a landslide victory by Prime Minister Narendra Modi’s party, two of India’s leading opposition figures offered their resignations over the weekend. Though their party leaders refused to let them step down, the gestures reflected the severity of their defeat.

The parties had failed to persuade Indians that the populist Mr. Modi had mishandled the economy and marginalized minorities. The “anti-Modi wave” opposition parties claimed would help them ride back to power never arrived.

Instead,...