The idle speed is determined by fuel flow and air mixture based on either computer or carb/tbi - Flywheel does not determine the idle speed but only influences how easily the engine maintains its current rpm and how quickly it can increase or decrease (the answer above is slightly inaccurate)
Idle speed differs by make and model and transmission type and is typically set based on the lowest RPM allowed to maintain enough inertia (based on flywheel weight) to allow:
1. The engine to stay running when the clutch is engaged in manual cars
2. Be in harmony with the stall speed of a torque converter in automatic transmissions (in order to allow the car to idle without resistance from the drive train - this rpm is lower than the stall speed of the converter ie. 700-800 RPM for a 1200RPM converter)