Some people claim that it is possible to have a non-partisan president in a republic when the president is indirectly elected by an electoral college or a qualified majority in the Parliament rather than being popularly elected as in France or in Portugal. However, look at what is happening in Italy, where the prospective presidential candidates are now Berlusconi and Draghi, both partisan politicians. Or even in Germany, where several presidents have been former cabinet ministers or professional politicians.
Yes, it may be old-fashioned (and non-meritocratic, not to mention undemocratic) to grant a monopoly on the office of the head of state to the firstborn child of a particular family that was sometimes picked up arbitrarily hundreds of years ago, but, if you want to have a strictly non-partisan, ceremonial head of state, who is not tainted by any connection to a particular political party or faction, the only way to go in practice is a hereditary monarchy. And I say so as someone who grew up in a presidential republic with partisan heads of state who are also BTW heads of government.
Besides, hereditary monarchy does provide a sense of historical continuity above fluid political circumstances, which matters in some older countries as it is the case in most European nations.