You can register to vote in-person all the way up to and including on Election Day at your town clerk.
Maine also has automatic voter registration at your local BMV when you renew or get a new driver’s license or change your address with the Bureau of Motor Vehicles.