Other universities have pushed back against the administration’s interference in higher education. But Harvard’s response, which called the Trump administration’s demands illegal, marked a major shift in tone for the nation’s most influential school, which has been criticized in recent weeks for capitulating to Trump administration pressure.