The liberal candidate in the state’s Supreme Court race benefited from outsize Democratic turnout as counties swung left across the state.