I do not know neither rule nor reference but:
so is an adverb or a Gradpartikel in this case while solches is an adjective and as such it has to get the same endings any other adjective would get in that situation.
It is also possible to say:
Solch ein Mädchen...
That sounds nicer and less mundane than the same with so.
Generally, case and gender endings do only apply AFTER the article, in a article-noun-situation of course.
Solches ein Mädchen...
is wrong because there is no reason for declination yet. The entity of Mädchen hasn't started and we are case-wise in the void till an article comes.
I don't think that there is a way to capture the differences in a translation. I can't think of a semantical difference between so(lch) ein and ein solche/r/n/m/s