Beyond Data Quantity: Key Factors Driving Performance in Multilingual Language Models