I am trying to apply texture to these faces on my model, but the texture is messed up as shown in the image because of the wired face I get after I used the boolean modifier.
I want the brick texture on nicely without any wired stretch or rotation.
Booleans will often not take into account surrounding vertices, edges, etc, and just cut away what they need to. You'll probably need to go in and do some surgery to the mesh itself to straighten things out a bit, or you could back out, subdivide the main rectangle first, then do the boolean routine. Hope this helps!
You can solve this by using the knife tool (Shortcut: K)
1) Initial situation
I tried to recreate a similar situation in the pictures below.
2) Make sure you are in orthographic view
This is very important because we are going to cut along straight lines so you must have the face you want to adjust right in front of you.
3) Using the knife tool
Select the knife tool (K button) and press C to enable the white guidelines. While you are in Ortho View these white lines correspond to the axis, so you are sure that the cuts you are going to make are perfectly vertical or horizontal. At this point you have to just press K, C and cut starting from an existing vertex to one of the edge of the faces, like in the picture.
Here are some of the shortcuts to use this tool:
4) Final result
After you are done cutting you have to select all the wrong edges created by the boolean modifier and dissolve them. In the end you should have something like the picture below. I decided to cut along the other faces too to avoid having N-gons which are faces made by five or more vertices; depending of what you are using the model for I could not matter if you have N-gons, but it is always best to avoid them.
If you want to know more about the knife tool here is the link to the blender manual: https://docs.blender.org/manual/en/latest/modeling/meshes/editing/subdividing/knife.html
This process I explained is definitely not very quick (especially in your case from what I saw based on your pictures), but it enables you to have great control on the topology of your model.