The 10 candidates competing in contested judicial elections this year have collectively raised nearly $400,000 in donations since January, and some have injected a substantial amount of their own money into the race, setting the stage for a competitive November election.