Jayne seems to have spent some time in the community, casing the magistrate's house with a view to burgling him. On the day, something clearly went wrong and he was forced to flee in the Magistrate's own ship.
Jayne: Look, Mal, I got no ruttin' idea. I was here a few years back, like I
said. Pulled a second-story, stole a lotta scratch from the Magistrate
up on the hill. But things went way south, and I had to high-tail it.
They don't put you on a pedestal in town square for that--
The busker also strongly implies that Jayne had sufficient opportunity to observe the indignities of their lives:
BUSKER: Our Jayne saw the mudder's backs breaking / and he saw the
mudders' laments / and he saw the Magistrate taking / every dollar
an' leavin' five cents / so he said, 'can't do this to my people' /
'can't crush them under your heel'/ Jayne strapped on his hat, and in
ten seconds flat, stole everything there was fit to steal-- - Jaynestown: Shooting Script
As to why he used his own name is anyone's guess but let's not forget that Jayne isn't exactly over-endowed in the brain area, nor was he expecting to get caught.