I made a raised vegetable bed (using pine boards) like the one in the link: I painted the interior with a white external house paint to protect the wood. I painted the outside with an exterior stain. Question: Could the paint lech into the soil and contaminate the food?
Good to consider, and yes, that would be very probable. In fact, some paints such as that are actually designed to deteriorate so as to shed bits of paint to keep looking nice and bright! So, it sort of depends on what's in the paint, but it seems like it would be an extremely poor idea to have any paint ingestion! Another consideration might be that it could be detrimental to the vegetable plants!
However, maybe could simply carefully line the container with 2-4 layers of thick flexible clear plastic, maybe with large grommets for drainage holes. This would keep the paint from getting into the soil & vegetables! And further protect your container! Also, if your container has wheels, that would make it easier to move, perhaps to bring in if extremely rainy or if unexpectedly cold etc
According to the Paint Quality Institute, quoted by this site, leaching of water-soluble components in latex paint occurs mainly within a few weeks of the paint's application.
All latex paints are made with some water soluble ingredients, such [as] dispersants, surfactants, wetting agents, thickeners, and glycols. All of these ingredients eventually come out of the paint film upon exposure.
These materials normally are leached out by rain and dew, usually over the first several weeks of exposure. Weather conditions can be such that a large proportion of water soluble ingredients are brought to the surface as the paint dries, or shortly thereafter, and appear typically as shiny streaks or blotches. Also, dew or light rain soon after painting can extract water-solubles, resulting in surfactant leaching.
Given this information, then it's logical to assume that, if you don't fill your raised bed with soil for at least 6-12 weeks, leaving it exposed to the weather, then you don't really have to worry much about anything leaching out of the paint. This would be especially true if the interior of the bed starts showing surfactant leaching, as mentioned in the linked site.