About retreating behaviour, this was slightly the case with Mount&Blade Warband, where units would now and then flee when their moral was low, which could happen due several factors.
Still I am unsure if historically anyone would be willing to charge alone against 100s of heavy cavalry units for a guy that pays ok.
Depending on the era, typically it was a full retreat and slaughter as soon as the shield wall broke. Not all the time, but that was just typically how it went.
Charging cavalry would be stupid. Soldiers knew no horse would challenge a bristling shield wall.