Well cheap is a relative term I suppose. A bike can be built to do everything necessary (essentially be a jack of all trades, master of none) for relatively cheap. Meaning... you could build a hybrid and have a bike that sucks at off-roading, is too heavy to race road with, geared so it can't be used on a track, and have alright cross capabilities.
However... if you want to build a bike that will be good at any one thing, the price goes up. This is why many (if not all of us) have a number of different bikes, let alone expensive ones. I mean I alone have a mountain bike, a track bike, and a road bike and the total of the three is likely a 5 digit number. But they all excel at what they're built to do, and nothing else.
So my point is, if you want to build a good bike that can do more than one thing... you can likely build it cheaply with respect to if you were to buy an entry level cross or MTB bike, but it certainly wouldn't be "cheap" and by the average persons standard they would probably say you're crazy.