Okay, the results are finally in. Large worlds take too long to generate, so I experimented with medium worlds instead. If you don't want to read all the research and just want the bit that pertains to your question, skip to the end. Wiki writers might be interested, though.
Firstly, medium worlds by default get 18 megabeasts.
Secondly, megabeasts get first dibs on caves. If there are 18 or fewer caves (medium island worlds by default have 15), all of them contain megabeasts. Additionally, if you have fewer than 18 caves, you also get fewer megabeasts. I'm not sure whether they really aren't there or they're just out there but they haven't done anything important enough to be on the legends list. Either way, it probably doesn't matter.
Thirdly, if there are many caves (medium region worlds have 75 by default), the rest get filled up by kobolds and semimegabeasts. If you have 20 caves in a medium world, the remaining two caves could get semimegabeasts and kobolds, or both be semimegabeasts. There could possibly be kobolds in both, but I'm tired of generating worlds.
Fourthly, there's a limit on how many kobold settlements you'll get (I got four in the 75-cave world), so if you have a lot of caves they'll mostly be populated by ettins, giants, and cyclopes. Additionally, you can get several of one kind of semimegabeast in the same cave, but there won't be, for example, ettins and giants in one cave. Also, if a megabeast somehow dies during worldgen (one of my bronze collossi got eaten by a demon), a semimegabeast will move in.
What's all this mean for you? Basically, just make sure you have lots and lots of caves. The more caves you have, the better your chances that you'll embark on kobolds or giants instead of dragons and bronze collosi. If you still don't have any luck, go to legends, and either look for kobold civs and semimegabeasts and note which caves they're in, or look for caves without megabeasts in them; then note the names of those caves and look for them when you embark.
However, if you finish worldgen and there aren't any civs left, and this happens several times in a row, you have too many caves. Turn them down a little bit.