What is the significance that the Sefer begins with "Divrei"?
Rashi: "Divrei" is always rebuke - "Eleh ha'Devarim Asher Diber Moshe", "va'Yishman Yeshurun?" (Devarim 1:1, 32:15). "Divrei Amos", "Shim'u ha'Davar ha'Zeh Paros ha'Bashan" (Amos 1:1, 4:1). "Divrei Koheles 1 " "v'Zarach ha'Shemesh", "Kol ha'Nechalim Holechim El ha'Yam" (1:1, 5, 7). Resha'im are called sun, moon and sea, which do not receive reward (Sifri Devarim 1). Resha'im are compared to the might of the sun; in the end, it sets. Refer to 1:7:1:1.
Ibn Ezra: "Va'Ydaber Sheloshes Alafim Mashal va'Yhi Shiro Chamishah va'Elef" (Melachim I, 5:12). Mashal is a parable for something else, like "Chud Chidah u'Meshol Mashal" (Yechezkel 17:2). The Nimshal of "Ha'Nesher ha'Gadol" (ibid. 3) is Nebuchadnetzar. Shir can be about the past, or [prophecy] about the future. The next verse clarifies whether they are his own words, like here "Amar Koheles", or another's 2 .
R. Avigdor Kohen Tzedek: Here is rebuke "Havel Havalim?", "Ki Al Kol Eleh Yevi'acha Elokim ba'Mishpat" (1:2, 11:9). Of his three Seforim, he wrote this in his old age (Shir ha'Shirim Rabah 1:10); only then he rebuked them. This is like Moshe, who rebuked Yisrael only after he gave to them the spoils of Sichon and Og and other benefits. Three Nevi'im prophesized rebuke, and attributed it to themselves - "Divrei Amos", "Divrei Yirmeyah" and "Divrei Koheles" (Koheles Rabah. Why is it called prophecy? Seemingly, it was said only with Ru'ach ha'Kodesh (and one opinion in Megilah 7a says that it is not Metamei Yadayim like Kisvei ha'Kodesh), for it is Shlomo's own Chachmah! - PF)
Magihah (in Toras Chayim): E.g. "Divrei Yirmeyah?; Asher Hayah Devar Hashem Elav" (Yirmeyah 1:1-2).
Why is he called Koheles?
Rashi #1: Kihel (he gathered 1 ) many Chachmos 2 . Elsewhere, he is called "Agur ben Yaka" (Mishlei 30:1) - he was Oger (collected) every Binah and Yaka (vomited) it out. Rid - i.e. he taught it to the Rabim 3 .
Ri Kara: We find that Chachamim abandoned the names that their parents called them, and were called names based on their expertise. 'They asked Torah' means that they asked Moshe; 'they asked Nevu'ah' means that they asked Yechezkel; 'they asked Chachmah' means that they asked Shlomo (Pesikta d'Rav Kahana 24). When Yechezkel talked to Chiram Melech Tzor, he called him Keruv - "Es Keruv mi'Meshach ha'Sochech" (Yechezkel 28:14). He compared him to a bird that spreads its wings and covers everything. Koheles gathered all Chachmah.
Rid: He authored this Sefer in his old age (Shir ha'Shirim Rabah 1:10). He gave a feminine name, for his strength faded due to age 6 , like a female.
Seforno: It is the intellectual Nefesh that gathered all Chachmos to it. "Va'Yechkam mi'Kol ha'Adam; ? va'Ydaber Al ha'Etzim? va'Ydaber Al ha'Behemah? v'Al ha'Remes" (Melachim I, 5:11, 13).
Metzudas David: The best investigation requires three matters. (a) He gathers the different opinions to contemplate which is best. (b) He received a tradition from someone renowned for Chachmah and fear. It is best if he passes the tradition to his son, for a father wants to improve his son, and hands over generously, and helps him to understand the Emes. (c) From experiences that occur, and all the more so if the matters occur in a place of many Chachamim who are wise to contemplate the truth of the matter. Koheles teaches the first 7 , "Ben David" teaches the second, and "bi'Yrushalayim" teaches the third. These matters had the ultimate investigation!
Metzudas Tziyon: This is like "Kehilas Yakov" (Devarim 33:4).
Rashbam: He gathered Chachmos more than "Kol Bnei Kedem" and "mi'Kol ha'Adam" (Melachim I, 5:10-11).
Maharzu (on Koheles Rabah 1:1): After his wives veered his heart, he vomited (forgot) his Chachmah.
Presumably, this includes Koheles, Shir ha'Shirim, Mishlei, and "Sheloshes Alafim Mashal va'Yhi Shiro Chamishah va'Elef" (Melachim I, 5:12). (PF)
Koheles Rabah 1:1: We learn from "Az Yakhel Shlomo?" (Melachim I, 8:1). R. Avigdor: - he gathered the entire world to hear his Chachmah. He rebuked them for theft, for everyone steals to leave money [for his heirs] after his death. Mishmaros came in and out to hear his Chachmah.
Shlomo lived only 52 years! Perhaps he weakened due to excess Bi'ah (he had 1000 women) - "Al Titen la'Nashim Cheilecha" (Mishlei 31:3) (PF). R. Avraham ben ha'Ramban (Teshuvah 45) - he transgressed the Torah Mitzvah and his own Chachmah.
Metzudas Tziyon: He gathered the opposing opinions, to refrain and clarify what is correct and what is not correct.
Why does it say "Ben David"?
R. Avigdor citing Koheles Rabah 1:2: He was a Chacham ben Chacham, Melech ben Melech, Avginus ben Avginus. Avginus is one of good lineage. Happy is one who has a peg to hang from, i.e. Zechus Avos to protect him!
Seforno: [David] introspected and grew wise - "mi'Kol Melamedai Hiskalti?; mi'Zekenim Esbonan" (Tehilim 119:99-100).
Refer to 1:1:2:6.
Why did he say "Melech bi'Yrushalayim"?
Rav Sadya Gaon: It means Melech [of] Yerushalayim.
Rashi: It is the city of Chachmah. Also Refer to 1:12:1:1.
Ibn Ezra: It mentions his capitol for his glory. We find a king called "Malki Tzedek" [because he was] "Melech Shalem" (Bereishis 14:18). Also "Adoni Tzedek" (Yehoshua 10:1) was called so, for he was Adon (master) in the place of Tzedek. "Al Divrasi Malki Tzedek" (Tehilim 110:4) refers to David ha'Melech.
R. Avigdor: "Shir ha'Shirim" hints to three Shirim that he wrote 1 , corresponding to his three Seforim. These correspond to three attributes. (a) "va'Yiten ha'Melech Es ha'Kesef bi'Yrushalayim ka'Avanim" (Melachim I, 10:27). (b) "va'Terev Chachmas Shlomo me'Chachmas Kol Bnei Kedem" (ibid. 5:10). (c) "va'Yeshev Shlomo Al Kisei Hashem" (Divrei ha'Yamim II, 29:23) - he ruled from one end of the world to the other. Anyone who mentioned his name, all Ruchos fled from him. In the end he descended three levels. (a) He was king only over Yisrael - "Mishlei Shlomo? Melech Yisrael" (Mishlei 1:1). (b) He was "Melech bi'Yrushalayim." (c) He was king only over his bed and 60 Giborim guarding him - "Hine Mitaso li'Shlomo Shishim Giborim" (Shir ha'Shirim 3:7).
Seforno: As king, he was able to gather all Chachamim of his generation and understand their thinking. Most Chachamim of the generation were found in Yerushalayim - "ul'Tziyon Ye'amer Ish v'Ish Yulad Bo" (ibid. 87:5).
It says "va'Yhi Shiro Chamishah va'Alef" (Melachim I, 5:12)! Perhaps he expounds this like Malbim, to teach that Shir ha'Shirim consists of five Shiros, and also Shir ha'Alef (refer to Shir ha'Shirim 8:8:1:4*).