A waiver has it's place, usually when you have been informed of an allergy and you can't guarantee that there won't be some cross contamination, or that a particular dish contains the allergen, but the customer tells you they can tolerate that amount of the allergen, and they still want to order.
Then you could be reasonably expected to sign a waiver to show you've been informed of the risk and have accepted it.
People don't like being 'told' what they can eat by someone serving them, and they don't like being refused service, but a lot would be quite happy to make an informed decision and take the risk - the waiver is to ensure that it's recorded you've made the informed decision yourself, in possession of the facts and if you become ill, it's not because the establishment were at fault.
At the end of the day if the person serving isn't confident that they can provide you with a food free from your allergen then they can either serve it anyway and hope for the best, refuse to serve full stop, or explain the risks and ask you to sign to say you understand and accept that risk. It's not feasible to expect every place to be able to cater for every single allergen.
Unfortunately there's people around that will have an allergy, eat out somewhere and then claim the food made them ill. They may well have been ill, they also may not have been, and it be nothing to do with that food at all, but they will blame that establishment regardless, even the best allergen policies and proof they are stuck to will have people who do this and while an investigation won't go anywhere, a slating on review sites and SM does damage.
I don't think this place handled it that well, an explanation that they couldn't guarantee that there wouldn't be gluten present in their food, and if you agreed to that risk, then asking you to sign the waiver is imo, acceptable, or if you refused but still wanted to order then politely refusing service. I mean on a human level, who wants to give someone food that might make them ill?
But either way it's going to draw attention to you when that happens because a conversation has to take place, it's not humiliation, the person having that conversation with you isn't responsible for the rubber neckers loving a bit of drama.