Scaling theory of mixed-valence systems