It's unclear whether the question addresses this as a possibility but it would seem to me that the moderators should both be subjection to periodic elections while having no maximum term limit.
I've seen a lot of comparison to the United States government in these answers and will therefore use it as an example:
The president - term limited
The moderators do not hold executive power. They are not singular decision makers. The reason to term limit the president is because (s)he has a great deal of power concentrated in one person. The president exists as a position because the United States needs a single person to be able to do things like represent the United States in treaty negotiations (whether in person or through an ambassador/negotiator). Clearly moderators are not used for such singular positions and therefore do not need a term limit.
Justices of the supreme court - the only constitutionally created office not subject to re-election/appointment
Justices are appointed to life terms because they are nominally above politics. They must not be held to the whims of the people because they do not form policy. Rather, they decide how specific cases fit the law, which can be unpopular (e.g. if the law does not cover an offense). Of course if they abuse their positions they can be impeached by congress. Furthermore, on the federal side in the United States, judges and justices are not elected by the people, they are appointed and confirmed by elected officials. There job is not to reflect the will of the people, but rather to be skilled in applying the law to specific cases.
As has been pointed out above, moderators do partially fall into this category. They apply the policies to specific cases. However...
Congressman and Senators - no limit but subject to elections every two/six years
Congressman and senators form the bulk of the representation in the United States democracy. They create the statutes that form the law that the courts decide. The president does have the veto power, though the bills are generally crafted in such a way that the president will sign them. As such congressman are elected every two years, so that they will well represent the public. Senators are elected every six years and are expected to be more level headed, representing more people and looking out more for the general good then any specific group of people.
While the moderators do not generally have the ability to change the rules of the site (I know of no specific cases where moderators set the rules, but I would imagine they would have a large say in any changes to the rules), the rules are broad enough that they have a large control over interpretation. As most of us are willing to follow the leaders (not a bad thing), we tend to make our decisions based on what we see the moderators doing. This is as close as we come to democratic decision making on Stack Overflow and in the Stack Exchange. As such, I would suggest we treat the moderators as congressman or better yet senators: elected to terms (overlapping in the case of senators), subject to re-election, generally re-elected unless something is going wrong.
Summary
I would suggest we treat moderators similar to United States Senators. As the closest things to democratic decision makers they should be subject to re-election. As the position involves a significant amount of learning and then teaching they should be elected to overlapping terms (in the United States Senate one third of the Senators are re-elected every two years for a term of six years). Perhaps a moderator would be elected for a three year term with elections held every year. Also, moderators up for re-election could be featured at the top of the list. This would allow moderators the time to learn the job and teach new moderators. Furthermore, most elected officials in any system are re-elected (the incumbent advantage). In general moderators would likely have long terms anyway unless their actions are noticeably and memorably unpopular.
Aside
It might be worth creating another position that decides on matters of policy. They could for example craft answer to popular questions of policy on the meta sites: e.g. when is a homework question allowable. There are often many competing not entirely contradictory, but not entirely the same answers on the meta. Often more than one with quite a few up votes. This body could draft, and vote on, official responses to said questions to leave no doubt as to the official policy. The site's rules could be seen as a constitution of sorts, not generally subject to change. These decisions would then be seen to make up a set of statutes, declaring with a higher degree of precision the interpretation of the rules. Vote records would be kept and if the community doesn't like the positions being taken they could vote in new leadership.
Meanwhile the moderators would be focused towards implementation of the decisions of the new body rather then interpretation of the rules of the site. This would also ease the transition for those with sufficient reputation to use many of the tools given to the community (i.e. votes to close, reopen, etc.). Yes, the meta site does offer some guidance, however it is often hard to determine when consensus has been formed or which of a competing set of answers to use. As far as moderator terms, in this case I would suggest they be long or indefinite (life) as they would no longer be representing the community but rather deciding on the basis of the rules that the new body formed.