Why is history from ancient times filled with empires that spanned huge areas, last centuries and able to field armies in the hundreds of thousands, but the middle ages seems to be full of smaller/shorter lived kingdoms and states? (in Europe and surrounds at least)
This isn't exactly an answer, but... are you sure that this interpretation is correct? Europe and its immediate surroundings during the Medieval period contained many expansive, rich, and powerful states, such as the Umayyad and Abbasid Caliphates, the Byzantine Empire, the Frankish Empire, the Holy Roman Empire, and the Kievan Rus (just to name a few examples). All of these were nations which 'spanned huge areas' and 'lasted centuries' - literally a thousand years if you're talking about the HRE or the Byzantines.
Medieval history is way cooler than you might initially think! You should read up on it, it's a hell of a ride.