The basic principle is discussed in Meseches Chagiga Daf 3:, quoting Koheles Perek 12:
בעלי אספות - אלו תלמידי חכמים שיושבין אסופות אסופות ועוסקין בתורה, הללו מטמאין והללו מטהרין, הללו אוסרין והללו מתירין, הללו פוסלין והללו מכשירין. שמא יאמר אדם: היאך אני למד תורה מעתה? תלמוד לומר: כולם נתנו מרעה אחד - אל אחד נתנן, פרנס אחד אמרן, מפי אדון כל המעשים ברוך הוא, דכתיב +שמות כ'+ וידבר אלהים את כל הדברים האלה. אף אתה עשה אזניך כאפרכסת, וקנה לך לב מבין לשמוע את דברי מטמאים ואת דברי מטהרים, את דברי אוסרין ואת דברי מתירין, את דברי פוסלין ואת דברי מכשירין.
A rough paraphrase goes like this: "Ba'aley Asufos" - this phrase refers to Torah scholars who sit in groups and learn Torah. These scholars proclaim thing impure, those scholars proclaim them pure.... Maybe a person will say: How can I learn Torah now (knowing that there is so much disagreement)? The Pasuk in Koheles continues, "They were given by one shepherd": One G-d gave them, one leader (Moshe) said them, they come from the mouth of the Master of all things... as it says, (Genesis 20) "And G-d spoke all of these things". You, too, open up your ears... and acquire for yourself a heart that can understand [both sides]."
This Gemarah is one of the foundations to reconciling different opinions, such as the conflicts between Pshat and Sod. A person has to open their ears and mind to be able to hear the arguments of both sides, and see the aspects of truth each one is advancing. Unlike in Halachah, in Parshanus HaMikra there is never a need to come to pshat. The historical question of which approach is technically accurate is besides the point. Both opinions have something valuable to teach us, and we would do well to learn both thoroughly and appreciate the unique insights they have to grant us.
For further information, you can look for information in the related topics: "eilu v'eilu divrei elokim chaim" and Machlokes.