The second one may be correct enough to be understood, but the first sentence is more correct.
Easier to understand for me, and my explanation may be wrong, would be:
This English song was heard being sung by the girl in her room.
I think it is because "was heard" indicates to me that what we are talking about something which happened in the past while "to be sung" means "will be sung" in the future. It seems that the (past / present / future) tense disagrees in your second example.
"was heard being sung" means that it was both heard and sung in the past and sounds more natural to me.
Please note that this is not my strong point in English though, so I might be wrong about this.