Universities across Massachusetts, including Harvard, said they will work to preserve diversity in the wake of the Supreme Court overturning affirmative action.