Stuck; I just read this string and see that you are leaning toward the Portland area. I commented on another thread that you started encouraging you to take a close look at Portland's suburbs. You will love it. Any of the towns you mentioned will fulfill your criteria. When we moved here in '91, we almost bought in Cape. I'm sure if we had we would not have regretted it. Many of our friends live there. But Falmouth has been wonderful. From the standpoint of infrastructure, the Falmouth schools complex is the most modern. The elementary school is less than 5 years old. All three schools (elementary, middle and HS) are contained within the same campus, with adjacent ball fields, so it is very convenient for families with different age children. The school budget passes easily each year, reflective of the resident's commitment to education.
We did not look at Yarmouth as it felt(ironically) a bit far out(ha-like 15 minutes). It does have more of a small town feel that operates independent of Portland if one chooses to be less integrated with Portland's services. But Falmouth and Cape have their own town centers as well with the added bonus that we feel as though the service providers we use are convenient even if they are located in Portland or South Portland. Most big box shopping is located in the South Portland/Scarborough Maine Mall area. All three school systems are top notch. Mock Trial, Drama, Robotics and the GT programs are terrific. Sports programs are also extremely good in all three school districts. Many state championship teams from year to year. Soccer and hockey are especially popular although LaCrosse and football are making a strong showing. Baseball is good too. My business partner coaches travel baseball and his son's team has gone to the national championships twice. Good figure skating and dance programs as well. Falmouth has three country clubs with golf courses. Two of the courses have beautiful neighborhoods woven throughout the links. Naturally golf and tennis are popular with adults as well as school age children. Falmouth also has its own anchorage with moorings available for residents. There is a yacht club as well with moorings. That makes Falmouth unique as Cape Elizabeth is bold ocean front with no natural harbors for boat moorings. Portland and South Portland have large marinas with slip rentals.
I know that U.S. News rankings are of interest to you but I wouldn't rule out either Cumberland Foreside or Scarborough as close in waterfront communities that offer similar housing/school systems. Scarborough's beaches are numerous and beautiful. On the other hand getting to one of those beaches takes max 15 minutes from our home in Falmouth so no need to live in Scarborough unless one wanted to live right on the beach which is possible as well. In the end it will probably come down to which home you like best, as all other factors will be about equally rated. Check out the recent Portland Press Herald series on the housing crunch in the city of Portland due to so many out of staters moving into new high end condos for Portland's ambiance and charm. The gentrification of previously low cost neighborhoods, that had amazing views is dizzying. The number of planned new development projects in downtown Portland from hotels to condos to commercial development of the waterfront is mind boggling. It seems like a new craft beer brewery or distillery is opening each week in the fast transitioning Bayside neighborhood. I'd also suggest you subscribe to "Old Port" and "Portland", glossy monthly magazines to get more of a feel for the flavor of the area. PM me if you have any questions. And good luck
PS-if swim team is in your future, Cumberland and Cape have their own pools at the high schools. Falmouth's swim team practices at Cumberland about 10 minutes by car. But Falmouth does have two indoor ice arenas
PPS- A good realtor website to check out housing in these towns would be REMAX by the Bay. ( I have no affiliation with any realtors - there are many good firms - this firm's owner knows the higher end of the market in these communities well and is a top listing agent for high end homes. Sotheby's is another firm with exclusive listings and knowledge of the top end of the market. And a third would be Town and Shore Realtors.)