It comes down to what you like to play. As you noticed, population (race) density is what matters. If you want a deep-space resource-grab game your optimal would be different than if you like long development and late wars. You don't need to invade planets to have a war over usable resources.
Currently I'm using a Large Galaxy with eight races including my own. I think the set up I used for this game is a little too under populated: Abundant Stars and planets with Habitable Planets on Common. It gave me long development times for the core planets, research and building a small fleet or two for pirate hunting, but the contact with a second major was at the first IP meeting.
Then you get into the galactic architecture... Loose clusters; then the details... number of stars, of planets, Even a densely packed medium galaxy with everything about planets on "Abundant" may not be very crowded.Galaxy size relates to the amount of time it takes to get any where. The rest is how often you run into things to slow you down before you get there.