I can give you some recommendations of places I like, I don't go out much these days and when I do it's usually when family is visiting so we generally go to "family" type restaurants. That said:
Benkay Japanese Restaurant and Sushi Bar in Portland. Very good Japanese food.
Benkay Japanese Restaurant and Sushi Bar: Portland, Maine
Royal River Grill in Yarmouth. Good food, nice setting right on the river by the boatyard. Yarmouth is in between Portland and Freeport.
Royal River Grill House
Tuscan Brick Oven Bistro in Freeport.
Tuscan Brick Oven Bistro
For more upscale places I can give you two, I haven't been to either but I'd be pretty confident that the food will be good. In Portland there is DiMillo's, right down in the heart of the Old Port. I believe this is one of the "must go to" places in Portland, specializing in seafood. You might need reservations.
https://www.dimillos.com
The other place is the White Barn Inn, in Kennebunkport (about 40 minutes south of Portland). My niece actually works at the hotel and my understanding is they have two restaurants there- one
VERY nice, the other just
very nice. I think I'm the only one in my immediate family that hasn't been there yet but everyone else says the food is excellent. Probably a very nice place to stay too.
White Barn Inn & Spa | Luxury Hotel in Kennebunkport - Auberge Resorts
Portland is definitely a "foodie" town though, so you can probably find something you will like with an internet search.
If you're in the Boston area and find yourself in Salem- stay away during the month of October. Not kidding, Halloween is a month long thing there and traffic and crowds are crazy (I used to live there). But the Peabody-Essex Museum in Salem is worth a visit.