No one sounds in the wrong here. It was close to pick up time so whoever was picking up would have already been on their way and not have time bring a change of clothes.
I am a yr 1 teacher in a low socio-economic area. We try to keep spare clothes on hand but....this isn't something that just magically appears. I buy it out of my money, they are my own children's out grown uniforms or it's unclaimed lost property.
Lost property does not usually ever include shorts/pants / skirts, socks or underpants. It's usually just jumpers and hats.
Last year I purchased 4 pairs of shorts and 2 pairs of pants in the 2 most common sizes. Despite writing "Mrs Nittersing" on the tags and asking for them to be returned I got none back.
If your child wet themselves and I had run out of spares then you'd get a phone call to bring spares to the school. Unless it was in the last few minutes of the school day when I'd have no time to find someone else to mind my class while I headed to a phone to call /parent already on their way.
This is just one of those things that happen at times with kids ( accidents, wee, poop, vomit, food spillages, pants ripping...) Spare clothes are not a given but we do try our best. It does sound like the T.A. could have been more discrete but it is hard to be discrete with any messages at pick up time.
This is just not an incident of injustice or wrong doing, however awkward and embarrassing for your daughter. We all feel for her and most of us have some kind of incident from our childhood which caused us some degree of social embarrassment, it's a part of life.