I agree with oklatom.
You're only staying in Maine temporarily. You'll have get your permit in Massachusetts, wait 6 months with your Massachusetts permit, and get your license in Massachusetts. You'll have to wait until you go back to Massachusetts to get your license.
When you get your permit, you would not have to retake anything (if your permit doesn't expire).
Overall, you have two options:
Option 1: Get your permit when you turn 16. If you do this, you would have to wait 8 months, until you go back to Massachusetts to get your license. If you choose to get a permit before you go to Maine, you have to check the restrictions on your permit.
You have to see if Massachusetts allows you to drive out-of-state on a learner's permit. If you can drive with your permit out-of-state, you can practice your driving in Maine (obviously with a licensed driver at least 21).
You also have to see if Maine allows out-of-state permit holders to drive there. Do some research and find out.
Getting your permit now would be useless if you can't practice your driving until you get back to Massachusetts.
Option 2: Wait until you come back to Massachusetts to get your permit.