Hi! This is something that bothers my a lot of times. I always end up creating a volume mesh instead of a plane with the solidify modifier to solve the problem but I was wondering if there is a way to solve this in an easy way. Now I'm working in the wall of a house and I modeled it using a plane an extruding some of the edges, but now the textures of the sides of the windows are all wrong... Thank you!
Here I have an extruded plane: The problem you are facing is because your UV's have stretch. To rremove it, you need to add seams. For this simple object, go to edit mode, hit 'A' on your keyboard to select your whole mesh, then hit 'U' and then click mark seam. You will see a red outline on your mesh, which shows a seam. Then again hit 'A' on your keyboard to select your whole mesh, then hit 'U' and then click Unwrap. Your stretching will go away.
Edit: If you want to keep the solidify modifier, then do this:
Open the shader editor and add a texture coordinate node to the material of your plane. Then drag the generated input to your vector input in the image texture. Then just set the settings from flat to box on the image texture node. It works.