A medical 501c3 nonprofit organization in the USA will have checked all the credentials of the medical professionals in their volunteer pool and will have specific protocols for who does what, when, and where. The medicine that they bring will have come from a reputable source and be verifiable in their records. It would be simple for CBP or the private companies that run the migrant detention centers to request information from the nonprofits involved such as copies of practitioner licenses and sources of medicines used. In fact, those things are often requested by governmental and non-governmental agencies when even the most friendly of collaborations are set up.
Furthermore, if the basic practices of documenting licensure and sources of medicines are not followed, the organization can face legal repercussions that include both civil and criminal penalties.
In short, “How would you ever know if the medical care is legit…” is just idle hand wringing that doesn’t relate to the real situation.