A raised bed liner is a plastic lining you can place between the soil and the wood you want to paint. The raised bed liner acts as a protective barrier and reduces any risk of soil contamination. You can find a raised bed liner in your garden supply store.
Painting the interior of your raised bed could cause toxic paint chemicals to leach into the soil. As already emphasized, the chemicals from the paint can contaminate the soil and harm your plants.
When painting your raised garden bed, ensure you use non-toxic exterior paint. Using non-toxic paint is safe for your plants, and it will also protect your wood.