Paint or other finishes serve as both decoration and protection for wood.
Most wood needs some protection if it's going to be constantly in contact with dirt, as the inside and bottom of the raised bed will be. Protection from rain, wind and sun is less important but will extend its life.
Paint or oil will protect the wood, but charring it won't.
Paint is designed to stay on the wood. If it does that and doesn't leach into the soil, there's no contamination of the garden bed at all.
Even if there is some leaching, it is most likely to be insignificant compared to the pollution that is already in the soil and falls from the sky every day, unless you're in an exceptionally good location. Anywhere in cities or near highways, there is lead from petrol. Anywhere near (most) commercial farming operations there is drift from herbicide and insecticide spraying. Anywhere with a history of either of these will have residual pollution. Etc, etc.
Bottom line: Don't worry too much. If you want the bed to last a long time, find the best finish you can and go ahead. If not, use the most rot-proof wood you can find and let it age gracefully.

Kim

Dear Kim,
I cannot share your trust in paint that is designed to stay on wood. Maybe you have better anti-pollution laws in Australia, so the paint I know doesn't reach your continent. And maybe it is a matter of very different weather. I do neither know any paint nor any wood that keeps it's shape in the garden. The mixture of sun, rain, fog, frost, heat makes the wood shrink.
And conventional paint contains heavy metals and other toxic substances for protection. We do not use it with vegetabels and it is also forbidden to burn painted wood in the oven.
Tropical wood lasts better but it is frowned at in Europe, because of the destroyal of the rainforests.
Therefore our traditional solution is to avoid that the wood touches the soil. Wooden "buildings" need shoes (foundation) from concrete or stone. Otherwise the microorganisms from the soil compost the wood. Wood like pine and picea. I bet tropical wood is very different.

This must be geographical differences.

I have decided to stick with love.
Hate is too great a burden to bear.
- Martin Luther King, Jr. -

Paint or other finishes serve as both decoration and protection for wood.
Most wood needs some protection if it's going to be constantly in contact with dirt, as the inside and bottom of the raised bed will be. Protection from rain, wind and sun is less important but will extend its life.
Paint or oil will protect the wood, but charring it won't.
Paint is designed to stay on the wood. If it does that and doesn't leach into the soil, there's no contamination of the garden bed at all.
Even if there is some leaching, it is most likely to be insignificant compared to the pollution that is already in the soil and falls from the sky every day, unless you're in an exceptionally good location. Anywhere in cities or near highways, there is lead from petrol. Anywhere near (most) commercial farming operations there is drift from herbicide and insecticide spraying. Anywhere with a history of either of these will have residual pollution. Etc, etc.
Bottom line: Don't worry too much. If you want the bed to last a long time, find the best finish you can and go ahead. If not, use the most rot-proof wood you can find and let it age gracefully.

Kim

Dear Kim,
I cannot share your trust in paint that is designed to stay on wood. Maybe you have better anti-pollution laws in Australia, so the paint I know doesn't reach your continent. And maybe it is a matter of very different weather. I do neither know any paint nor any wood that keeps it's shape in the garden. The mixture of sun, rain, fog, frost, heat makes the wood shrink.
And conventional paint contains heavy metals and other toxic substances for protection. We do not use it with vegetabels and it is also forbidden to burn painted wood in the oven.
Tropical wood lasts better but it is frowned at in Europe, because of the destroyal of the rainforests.
Therefore our traditional solution is to avoid that the wood touches the soil. Wooden "buildings" need shoes (foundation) from concrete or stone. Otherwise the microorganisms from the soil compost the wood. Wood like pine and picea. I bet tropical wood is very different.

This must be geographical differences.

Hello, Ayu,
Yes, there are geographical differences, but we share enough general principles to be useful.
• Avoiding the wood touching the soil is a good idea but can't apply to garden beds (unless you lined the bed with heavy plastic, I guess).
• If untreated wood does touch the soil, the kind of wood makes a big difference. Hardwoods like eucalyptus (here) or oak (in Europe) will last far longer than softwoods like pine. That's true whether you worry about rot or fungus or insect pests. I could make a bed of 50 x 200 mm hardwood slabs and be sure it would last last five years without looking too bad and ten or more without falling apart. If I used pine, it would last less than half as long.
• "Treated pine" is sold here for fenceposts etc, and it lasts really well. We have some that has been used as edging for garden beds for twenty years and is still okay. The trouble is that that the treatment is poisonous. Check out this pdf for technical details - https://www.pinetimberproducts.com.au/w ... er_cca.pdf
• Lead-based pigments were outlawed here at least twenty years ago because of the health risks when it flaked off or was burnt. The newer paints are not so poisonous and most of them stay on the wood for a good long time, so they are less of a concern.
• Wood swells, shrinks and warps mostly because of moisture getting into it and then drying out again. Paint will stop most of that. So will oil, but usually not so well.

I'm thinking we really should use california redwood limber for our raised beds, even though it is more costly. Redwood is very durable, local and sustainably farmed (I think?). Our house was built around 1890's with local redwood, there's barely any damage or rot, if any. Termites hate it.

I'm thinking we really should use california redwood limber for our raised beds, even though it is more costly. Redwood is very durable, local and sustainably farmed (I think?). Our house was built around 1890's with local redwood, there's barely any damage or rot, if any. Termites hate it.

And why does it grow so successfully there? Because termites hate it, of course.

I built a shed in my garden a couple years ago, and in order to prevent the wood from rotting upon contact with the soil, I painted it and then laid it in a "pool" of concrete (dug a bucket-shaped hole, put a brick half at the center so that the "foot" of the beam doesn't rest on earth, poured concrete, shoved the wood beam in it, waited for it to dry, done). Of course, it's only been 5-6 years, but so far, it's been holding well, we haven't had any issues with rot, termites or anything.
Plus, it's in Belgium, which has an extremely rainy and overall humid climate (like a jungle, but cold) which usually makes wood and other rot-sensitive materials degrade much faster than in other regions.