My question is pretty simple. I want to know if I can vote for non-religious partties (like Likud or Tikvah Chadasha) or for semi-religious parties (like Yamina). When asking this question to another Rabbi, I was told that this was not allowed, as the Rambam (Hilchot Melachim 1, 7) writes very clearly that it is prohibited to appoint any person to any public position in the Jewish community who is not a Yira Shamiyim. What do you think about this?
HaRav Zvi Yehuda Kook actually embraced and blessed the right-wing HaTchiya party which, in addition to Rav Hanan Porat and Rav Eliezer Waldman, was headed by Prof Yuval Ne'eman, who was not Shabbat-observant. Accordingly, it's obviously it's not prohibited. What the Rambam speaks about does not apply to democracy, where one votes for the ideology and actions and not for an individual. Nevertheless, it's worthy to mention, that even in those elections when Rav Zvi Yehuda supported HaTchiya, he himself voted and suggested to vote for the Mafdal, the religious-Zionist Mizrachi party, which supports also Am Yisrael, Eretz Yisrael as well as the Torah of Israel!