How was Solomon considered one of the wisest? According to Deuteronomy 17:14-17, there are a couple of rules a king should follow. From the NKJV:


  14 “When you come to the land which the Lord your God is giving you, and possess it and dwell in it, and say, ‘I will set a king over me like all the nations that are around me,’ 15 you shall surely set a king over you whom the Lord your God chooses; one from among your brethren you shall set as king over you; you may not set a foreigner over you, who is not your brother. 16 But he shall not multiply horses for himself, nor cause the people to return to Egypt to multiply horses, for the Lord has said to you, ‘You shall not return that way again.’ 17 Neither shall he multiply wives for himself, lest his heart turn away; nor shall he greatly multiply silver and gold for himself.


Which roughly boils down to:


he must be chosen by the LORD
he can not be a foreigner
he must not acquire a great number of horses for himself
he must not return his people to Egypt
he must not have multiple wives
he must not acquire a lot of silver and gold


Solomon, a king considered among the wisest man in the Old Testament, appears to have violated at least 3 of those rules.


He had an awful lot of wives (700 plus 300 concubines, 1 Kings 11).
He had an awful lot of horses (40.000 stalls of horses (1 Kings 4) of which only 4.000 for military purposes (2 Chronicles 9).
He had an awful lot of gold (666 talents of gold each year, 1 Kings 10).


And still, he's considered one of wisest man in the history of Israel.

The rules of Deuteronomy are old. Solomon must've known them (Deuteronomy 17:18-20 is quite explicit about this). So how is a man like that considered one of the wisest if he's led astray by his women for which he is explicitly warned every day of his kingship? Even, Israel was torn apart by the sins of Salomon (1 Kings 11).

Still, In Luke 11, Jesus is considered greater than Solomon. Jesus being greater than anyone isn't a surprise, but Solomon being mentioned here as the next-best-thing despite his foolishness is.

How was Solomon still considered in such a high regard during the time of Jesus, a point at which I expect the Israelites to know of Solomon's foolishness?

I'm explicitly looking for a protestant-bible point-of-view.
I Kings seems to imply King Solomon was the wisest of all men in all nations at his time:

1 Kings 4:29-31 (DRB)
And God gave to Solomon wisdom and understanding exceeding much, and largeness of heart as the sand that is on the sea shore. And the wisdom of Solomon surpassed the wisdom of all the Orientals, and of the Egyptians, and he was wiser than all men: wiser than Ethan the Ezrahite, and Heman, and Chalcol, and Darda the sons of Mahol, and he was renowned in all nations round about.

Solomon wasn't perfect (in fact, we don't even know if he finally repented of his apostasy with the idols of his heathen wives: cf. 1 Kings 11:4); but the reason he had so much wealth was because God gave him it, seeing that he asked for only wisdom, and not for riches etc:

2 Chronicles 1:9-12
[Solomon said:] Give me wisdom and knowledge that I may come in and go out before thy people: for who can worthily judge this thy people, which is so great? And God said to Solomon: Because this choice hath pleased thy heart, and thou hast not asked riches, and wealth, and glory, nor the lives of them that hate thee, nor many days of life: but hast asked wisdom and knowledge, to be able to judge my people, over which I have made thee king, wisdom and knowledge are granted to thee: and I will give thee riches, and wealth, and glory, so that none of the kings before thee, nor after thee, shall be like thee.

That is, the prohibition against these things which God rewards Solomon was because of the desire to have them, not them in themselves: God here judges that such who don't want these goods are worthy of them, since they did not have an inordinate want or longing for them.