I was a school cook for a few years, and would cook almost exact portions - give or take a couple, to allow for droppages. Fish, sausages etc would be counted, and audited at the end of each half term.
With curry/pasta/mince type dishes, there would always be a bit extra - as obviously it was better to over rather than under cater. Portions were supposed to be the same for each child, but I thought that was a ridiculous rule, so I differentiated. It would be senseless to serve the same to a tiny 4yo as a huge strapping 11yo.
I worked in a small village school, so I got to know the children individually, and their likes and dislikes. I encouraged veg eating - but, if I knew someone genuinely hated sweetcorn, for example, then I'd leave it off their plate. There would be a child further back in the queue who loved it, so they could have double.
Op, the situation with your DS is tricky. On the one hand, I couldn't have given him nothing - particularly knowing he was generally a good eater, and had tried one option and not liked it. I find it almost impossible to believe that the cook couldn't have spared a little bowl of pasta and sauce, with even one meatball. It's not much, but enough to tide a little 5yo over til hometime.
On the other hand, the cook can't be seen to be doing this for one child, because I can assure you, it would lead to anarchy in the dining hall! If the others get a whiff of someone else being allowed a second option, the floodgates would open - and that's not even starting on the parents collaring the teachers asking why their DC wasn't allowed to change their mind, when someone else's DC was allowed to last week.
Had it been me, I would have swapped his meal, and tried to do it discreetly with a minimum of fuss. I don't think you can raise this with the school though, because the official position will always be that meals can't be swapped.
As for pudding, I would give that regardless of what's been eaten at the main course. I don't believe the two should be linked. Also, nobody's got the time to be policing each child and whether they've eaten enough to merit getting a pudding.
Happy memories of being a school cook, I loved it 