While it doesn't matter, Nandy is probably one of the two candidates from a more comfortable background - the granddaughter of a Liberal MP and Lord, and the daughter of an influential academic and equal opportunities/race relations campaigner (both of Thornberry's parents were academics; her father ended up working at the UN). Starmer is the son of a toolmaker and a nurse.
Class background is not a straightforward thing when it comes to leading the Labour party. I'm struggling to think of the last time the party was led by someone who had genuine experience of manual labour. Not Corbyn obviously. But not Miliband, Brown or Blair either. Not Smith or Kinnock or Foot, and not Jim Callaghan. Not Wilson or Gaitskell and certainly not Attlee. It's probably George Lansbury, who led the party between 1931 and 1935 and had worked as a navvy (one of his achievements being helping to flatten the pitch in Brisbane for the Ashes in the late 19th century).
Of the other ones mentioned above only Jim Callaghan and Corbyn didn't go to university. Callaghan because he was born into a working-class family which had lost its main bread-winner (his dad) and because he joined the navy during the war. Corbyn because, although privately educated and well-off, failed to get his A Levels. Of the rest, only Kinnock could be said to come from a working-class family (dad was a coal miner).
It's instructive to compare the present contest with the one in 1976, where Callaghan beat off the other contenders, to succeed Harold Wilson. Wilson had gone to Oxford university (as had the two previous leaders, Gaitskell and Attlee). In the race to succeed him, apart from Callaghan, there was Roy Jenkins (Oxford), Tony Benn (Oxford), Denis Healey (Oxford), Tony Crosland (Oxford) and Michael Foot (Oxford). Being 'working class', or even being from a 'working-class background' simply didn't matter when it came to leading the Labour party.
It's paradoxical that it does now. Back in the 1970s the working class was a major part of the nation. The old staple manufacturing industries still accounted for a large part of the economy, even if they were in decline. Coal, iron and steel, shipbuilding, heavy engineering, car manufacturing etc - not to mention the docks and the railways. Labour drew nearly all of its support from blue-collar workers. Yet its leaders were usually privately educated Oxbridge graduates in the liberal professions.
Now, with the working class a shadow of itself and with more people going to university than ever before it has suddenly become the 'thing' to establish one's 'working-class credentials'. Even Keir Starmer is being forced to talk up 'dad the toolmaker'. Rebecca Long Bailey is inventing false memories of when her dad lost his job at Salford docks. Emily Thornberry, who goes everywhere heaving a white van around with her, is saying she was born on a council estate. Richard Burgon comes on TV with a face blackened with coal dust, asking whether he has time to "eat mi' snap".
OK, I made the last one up. But he would do if he thought he could away with it.