A decision to freeze federal grants and aid had sparked panic, as it was expected to disrupt billions of dollars of spending across healthcare, education and other programs. The move faces several legal challenges.