A Massachusetts federal judge will hear arguments on whether the Trump administration can proceed with plans to slash the size of grants for institutions conducting medical research.