Yeah, they all need maintenance (what doesn't) but I have heard that Specialized bikes seem to depreciate faster and need more maintenance when they get older, whereas Treks last longer with less issues (this has been the case with my two used Specialized bikes and two used Trek bikes, but it's a small sample population).
As a bike mechanic, I assure you that given the same components there's little difference in maintenance between brands. Full suspension does change that a little bit, some pivot/linkage designs burn through bearings faster etc. I don't really have an opinion about trek or specialized, other than that the owner of specialized is a litigious richard and they're both bland mass market brands.
At the end of the day, mass market frames are pretty similar these days and everybody uses roughly the same component grades across similar price points. I'd take a 15 year old frame with high end components over something midrange and new any day. Way less plastic, way more metal. Way more durable. I guess that logic is why we're all still driving these 40 year old Yotas?