In a 5-4 ruling, the Supreme Court held in the negative on this point:
The question presented in this case is whether the First Amendment permits the Minnesota Supreme Court to prohibit candidates for judicial election in that State from announcing their views on disputed legal and political issues.
The primary dissent was written by Justice Ginsburg, who supported a more restrictive rule for judicial elections, which makes her supportive comments on Justice Kagan's approach during her hearings understandable. Justice O'Connor worried about the impartiality of judicial elections, but deemed the ban unconstitutional under under the First Amendment. Her approach continues to be to support changing them as a policy matter: if you want judicial elections, the concerns addressed by the dissent come with the program.
Justice Scalia in the majority opinion noted that the key issue here was to avoid impartiality, that is, partiality to a certain specific party. It was not to avoid voicing an opinion on an issue, which at any rate does not mean you cannot change your mind once you actually became a judge. Pretending a judge did not have a side on issues was if anything a bad idea:
A judge’s lack of predisposition regarding the relevant legal issues in a case has never been thought a necessary component of equal justice, and with good reason. For one thing, it is virtually impossible to find a judge who does not have preconceptions about the law. As then-Justice Rehnquist observed of our own Court: “Since most Justices come to this bench no earlier than their middle years, it would be unusual if they had not by that time formulated at least some tentative notions that would influence them in their interpretation of the sweeping clauses of the Constitution and their interaction with one another. It would be not merely unusual, but extraordinary, if they had not at least given opinions as to constitutional issues in their previous legal careers.” Laird v. Tatum, 409 U.S. 824, 835 (1972) (memorandum opinion). Indeed, even if it were possible to select judges who did not have preconceived views on legal issues, it would hardly be desirable to do so. “
The case was at issue in a recent lower court ruling involving judicial elections, Bauer v. Shepard, summarized at Findlaw:
In plaintiffs' challenge to certain provisions of the Indiana Code of Judicial Conduct, claiming that they refrain from speaking about controversial issues such as abortion or from filling out questionnaires about abortion sent by the Indiana Right to Life, Inc., because they fear the prospect of sanctions under the Code, district court's holding that all of the contested provisions are constitutional is affirmed where: 1) district court's judgment that a plaintiff's challenge to the pre-2009 Code became moot is modified as it is unripe; 2) the fundraising provisions are constitutional; 3) the partisan-activities provisions are constitutional; 4) the "commits clauses" provisions are not overbroad; and 5) the recusal clause does not present a constitutional issue at all.
Again, voicing one's position on various sensitive matters, including matters of law, was not deemed in violating to said code of conduct requiring the usual freedom of bias or appearance thereof and so forth. It might be a good dodge to claim that answering such questionnaires were necessary for judicial neutrality and such but that is quite different. For instance, justices can dissent in one case and try a matter on the same general subject and not be deemed biased. Justices wrote on matters they decided upon as law professors and so forth such as this nominee to the bench (In Reckless Hands is a good book). Will her family connections be more examined by any confirmation hearing than her views?
I reaffirm my belief that Kagan and other judicial nominees can and should be subject to more Q&A on their judicial ideology and legal views. The dodge offered doesn't work in judicial elections and should not in the indirect political process used in the federal nomination field. Kagan was right the first time.