Well, I certainly consider Somerville part of the urban cores of Boston being on the T (sort of) etc. And it's expensive as a result. But get out beyond 128 and, with the exception of some specific communities like Concord, housing prices drop considerably.
I think they're counting Somerville and similar locales as part of the urban core. By that metric though places like Mattapan should also be part of the urban core and are a lot more affordable.
Somerville is more accessible to both Cambridge and downtownish Boston where a lot of the professional jobs are than somewhere like Mattapan. But to your broader point, yes, there are certainly parts of the City of Boston that are considerably cheaper albeit less desirable from housing stock, safety, environment, etc. perspectives.