Mello-Roos can last a specific number of years or can go on forever.
Although originally intended to fund building projects, Mello-Roos funding has also taken on the role of paying for day-to-day operation of government facilities and services. For example, if a subdivision is built on the outskirts of town and the police department needs to add officers and cars to service this area, that extra expense can be funded through Mello-Roos. That subdivision is simply designated a "community facilities district" and the new homeowners are slapped with Mello-Roos assessments.
Many city governments have become addicted to Mello-Roos style funding, since they usually get a lot of push-back from the community is they attempt to raise local taxes. Mello-Roos was originally devised by state lawmakers to counter the effects of Prop. 13, which restricted tax increases.
Anyone considering buying a home where Mello-Roos taxes are in place should thoroughly research the past and current use of Mello-Roos funding. If Mello-Roos has or is being used to fund daily government operations, it is highly likely that those payments will never go away - even if the current funding has an expiration date. It's far too easy for government officials to keep going back to the trough.