Skip to the end for short answer lol.
This is a very difficult question to answer, because, as xdac said, there are so many variables that can affect the life of the engine. But you seem like a smart guy, so you already knew that
The reason it is so hard is because an average mileage considering the vast differences based on all these factors doesn't necessarily mean anything. Factors that can contribute to longevity of the motor and trans: oil level (forget to put oil in, put too much or too little oil in, not watch the oil level and let it get really super low as the bike burns oil, etc. etc.), service intervals and quality of maintenance/repair services, luck (ex: unlucky=not noticing that the oil filter you just bought is not the right one, because the box it came in says TW200...), use (ride like an ass hole or an old lady), break in procedures, regular engine warm up practices (or lack thereof when riding), possible quality control issues from the factory, etc. Anyway, assuming the WORST of all these things, you could need a rebuild 300 miles from brand new. Assuming the BEST of all these factors, the bike will probably go about 30,000 miles without needing a top end rebuild (the highest mileages without rebuild I remember reading have been about 25-30k), 50,000+ miles with a couple rebuilds. My TW has 15k miles on it now and has basically had two top end rebuilds. The first was because of the negligence of the work done by the utterly incompetent dealer service personnel whom I used to pay to "maintain" my bike, before I knew better. They put the wrong oil filter in the bike and the top end was f'ing toast a few minutes later. The second rebuild was done by myself a couple thousand miles after the first rebuild, because one of the valve adjuster nuts backed out, and my friend was on the bike and didn't know/think to shut it off right away. However, the bike has had tons of problems since 3k miles (some of them undoubtedly due to the failing service department before I started doing my own maintenance) and I suppose my particular unit probably would have needed a top end by now anyway.
SHORT: If you are a realist/pessimist, expect about 15k miles out of an average TW. If you're an optimist and you think you can do everything right (maintenance, break in, go easy on the bike, etc.) then expect about 30k before a top end job is needed. Of course depending on the particular circumstances, your experience could be more or less than these numbers.