The judge also found that the nonprofits will “suffer imminent, irreparable harm” if they don’t gain access to their funding.