In MA, is it legal to cross someone's property on the ocean beach if the beach is not developed and is not posted?
In many US states, beaches, or at least the tidal areas of beaches, have unlimited public access. In MA this is not so, although some notification, such a s a sign, will generally be required before any law against trespassing can be enforced.
According to an article published by a real estate law firm:
Massachusetts has a unique set of laws giving coastal property owners more extensive private rights to beachfront area than other states. In most coastal states, there is unlimited public access to beachfront areas and you can walk unfettered along the beach. In Massachusetts, however, that is not the case. Here private coastal property owners own the beach area adjacent to their properties down to the mean low tide area, with some limited public access exceptions. This is how the concept of “private” beach areas have been established.
The origin of this law dates back to the Mayflower days. In order to facilitate coastal development, under the Colonial Ordinances of 1641-47, the Massachusetts Bay Colony conveyed most, but not all, rights of ownership to the area between the average or mean high water mark and the low water mark (up to 100 “rods,” or 1,650 feet, from the high water mark) to all private coastal landowners. The land—but not the water—between the two tide marks is known as “private tidelands.” This typically includes all of the wet sand area on beaches.
You are not trespassing until you are told you are
Being told may be verbal or by a sign or by a fence or by common expectation (e.g. you can walk to someone’s front door but not have a picnic in their garden) but until you know you are on someone’s land without permission you are not trespassing.