Praise be to Allah, and may Allah’s peace and blessings be upon the Messenger of Allah, his family and his companions.
As to what follows:
In response to your question, we say, and with Allah Almighty lies all success:
The truth is that there is no metaphoric usage in the Qur’an. Furthermore, according to the scholars of balaghah (Arabic eloquence), the definition of majaz (metaphor) is, “The usage of a word for other than what it was initially placed for.” For example, the word lion linguistically means, “The well-known predator animal.” So if you heard someone say, “I saw a lion giving a speech,” you would have been certain that what was meant by it is a brave man, and it did not cross your mind that it is the predator animal, because this act is not imaginable for it. It is from here that they referred to this as majaz (metaphor). But the truth is that it is not majaz (metaphor), but rather plain speech, as the Arabs do not understand from this word other than what we have just mentioned, which goes to prove that it is plain speech. A detailed explanation of this issue is not suitable for this short answer, and what I have mentioned is somewhat sufficient.
As for what you have mentioned from Ghazali in his book Jawahir al-Qur’an, in his resemblance of the Qur’an to an endless ocean filled with oysters, which further contain precious pearls of the Qur’an, and that some people become convinced by merely obtaining the oysters, while others search for the pearls; and also his statement that the Qur’an has an apparent and hidden meaning to it; the answer is to say:
These words are summed up; they contain correct meanings and incorrect meanings. So if what is meant by them is that this Noble Qur’an consists of evidences and indications of its miracle, that it is from the Lord of the worlds which the Trustworthy Spirit (Jibril) has brought down upon Muhammad (peace be upon him) so that he may be of the warners, and that most people stop at the words without surpassing them to the meanings benefited from them which do not oppose the apparent words; then this is something of which there is no doubt about its validity, for the perceptions and understandings of people vary. That is why `Ali (may Allah be pleased with him) said, when asked whether the Prophet (peace be upon him) specified him with certain knowledge, “No, unless Allah gives a slave understanding of His Book.” This understanding varies among people according to Allah’s inspiring them.
Shaykh al-Islam Ibn Taymiyyah said, “There is no doubt that Allah inspires the hearts of His God-fearing allies and righteous slaves, due to the purity of their hearts from what He dislikes and their following of what He likes, such that He does not inspire to others. This is as `Ali (may Allah be pleased with him) said, ‘Unless Allah gives a slave understanding of His Book.’ It is also mentioned in a tradition, ‘Whoever acts according to what he knows, Allah grants him knowledge that he does not have.’ Moreover, the Qur’an has proven this in more than one place, such as His statement, ‘But if they had done what they were instructed, it would have been better for them and would have strengthened them [in faith]; And then We would have given them a great reward from Us. And We would have guided them to a straight path.’ [Al-Nisa’ 4:66-68]”
Then Ibn Taymiyyah (may Allah have mercy on him) said, “He has also informed that following what He dislikes causes knowledge and guidance to be turned away, such as His statement, ‘So when they turned away, Allah turned their hearts away.’ [Al-Saff 61:5]” [Majmu` al-Fatawa, vol. 13, p. 245]
The point is that inspiration of the words of Allah Almighty and the words of His Messenger (peace be upon him) for the slave is in accordance with his carrying out the commands of Allah Almighty and the commands of His Messenger. That is why it is reported that al-Shafi`i (may Allah be please with him) derived a thousand points of benefit from the statement of the Prophet (peace be upon him) to the child whose bird had died, “O Abu `Umayr, what happened to Nughayr (the little sparrow)?” That is the bounty of Allah, He grants it to whom He wills, and Allah is the All-Encompassing and the All-Knowing.
However, if Ghazali meant by his words that we derive from the words of Allah Almighty or the words of His Messenger that which is contrary to what their apparent meanings indicate, then this is the way of the people of bid`ahs among the Batiniyyah, Rafidah, extreme Sufis and others. So for example, the Batiniyyah among the Rafidah say regarding the meaning of Allah’s statement, “May the hands of Abu Lahab be ruined, and ruined is he,” [Al-Masad 111:1] that they are Abu Bakr and `Umar (may Allah be pleased with them); that the meaning of His statement, “Then fight the leaders of disbelief,” [Al-Tawbah 9:12] that they are Talhah and Zubayr; and that the meaning of His statement, “As was the accursed tree [mentioned] in the Qur’an.” [Al-Isra’ 17:60] that they are the Umayyads.
Also, the philosophers interpret angels and devils to be the forces of the soul, and interpret what people are promised in the hereafter to be parables presented in order to understand what happens to the soul after death of pleasure and pain, not to demonstrate live realities of the hereafter. As for Ahl-us-Sunnah wal-Jama`ah, the saved group who will always remain victorious, they refrain from interpreting the words of Allah or the words of His Messenger (peace be upon him) contrary to what their apparent meanings indicate, except when there are indications that the apparent meanings of the words are not intended.
As for what you have mentioned that some of your friends say that the Qur’an must be taken literally, and the example you gave that when Allah’s Hand is mentioned we must accept it as is without interpreting it with a metaphorical meaning that indicates the power of Allah Almighty; what they have mentioned of the obligation of taking the apparent meanings of the Qur’an and Sunnah is true, and that we do not interpret them with far off meanings, for the interpretation that you have mentioned is a kind of distortion, because it is directing the words away from their apparent meanings without evidence to suggest that, and this is distorting words from their proper usages.
What is obligatory upon us regarding what Allah Almighty has informed about Himself or His Messenger has informed about Him, is to allow it to pass and believe in it as it has been mentioned without figuratively interpreting, rejecting, drawing resemblance, or explaining how. So we affirm for Allah what He Almighty affirmed for Himself or what His Messenger (peace be upon him) affirmed for Him; affirmation without drawing resemblance and transcendence without negation. This creed concerning the names and attributes of Allah Almighty, is what the early Salaf of the Ummah from among the companions, their followers, then their followers and the Imams of the religion after them, were all upon. So take a hold of it and grasp onto it with your molar teeth, for the latter part of this Ummah will never be rectified except by that which rectified its first part.