Wealth should be invested and not let to stagnate, but only after taking a lot of precautions
Question

What is the alternative solution, from an Islamic perspective, for someone who has some money and wants to invest it, but he does not have any way to undertake a commercial project in order to earn money through it? For example, orphan children or someone who has no experience in doing any kind of commercial project.
Praise be to Allah.Firstly:
Islamic teachings are aimed at protecting wealth and guarding it from loss.
It was narrated from al-Mugheerah ibn Shu‘bah that he said: The Prophet (blessings and peace of Allah be upon him) said: “Allah dislikes for you gossiping, asking too much and wasting wealth.” Narrated by al-Bukhari (2408) and Muslim (593).
Al-Haafiz (may Allah have mercy on him) said: “wasting wealth” – we noted above that most scholars interpreted this as referring to extravagance in spending, although some of them limited it to spending for haraam purposes. The strongest view is that it refers to what is spent inappropriately on things that are permissible according to Islamic teachings, whether that has to do with religious or worldly matters. That is not allowed, because Allah, may He be exalted, has made wealth a means of serving people’s interests, and wasting it leads to the loss of those interests, either the interests of the one who wastes it or the interests of others. An exception is made from that with regard to spending a great deal on charitable causes in order to attain reward in the hereafter, so long as it does not lead to missing out on other religious duties that are more important than it. End quote.
Hoarding wealth and not making use of it, even if it is not regarded as wasting the wealth, is still making it idle and missing out on the interests that could be served by putting this money to work for its owner and for others. Putting money to work serves many interests in general, whereas leaving it idle causes these benefits to be lost, in addition to what could happen because of the wealth being consumed by zakah and spending.
Hence ‘Umar ibn al-Khattaab (may Allah be pleased with him) said: Whoever takes care of an orphan who has wealth, let him do business for him [with his wealth] and not leave it to be consumed by zakah. Narrated by ad-Daaraqutni (2/109) and al-Bayhaqi (11301); classed as saheeh by Ibn al-‘Arabi in ‘Aaridat al-Ahwadhi (2/99).
Al-Bayhaqi (11303) narrated that al-Hakam ibn Abi’l-‘Aas said: ‘Umar ibn al-Khattaab (may Allah be pleased with him) said to me: Do you deal in trade, for I have the wealth of an orphan that is about to disappear because of zakah. I said to him: Yes. So he gave me ten thousand, and I stayed away from him for as long as Allah willed, then I came back to him and he said to me: What happened to the money? I said: Here it is; it has reached one hundred thousand.
Al-Bayhaqi also narrated (11304) that al-Qaasim ibn Muhammad said: ‘Aa’ishah (may Allah be pleased with her) pay zakah on our wealth which was being used to do trade in al-Bahrain.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
It is not permissible for an orphan’s wealth to be taken care of except by one who is competent and has experience in what he is taking care of and can be trusted with it. If the one who is taking care of it does not meet this description, then he should be replaced … It is mustahabb to do business with the orphan’s wealth, because of the words of ‘Umar and others:  Do business with the wealth of orphans, so that it will not be consumed by zakah."(Al-Fatawa al-Kubra  5/397).
Based on that, the one who has wealth, or is taking care of an orphan’s wealth, should do business with this wealth and work to make it grow; he should not leave it to be consumed by zakah and spending, or to be vulnerable to loss or theft.
If he is able to do that work himself, he should do it himself. If he is not able to do that, then he should look for an honest and trustworthy man who has experience in trade, and make him a partner so that they may both benefit from this wealth.
Another way of dealing with it is to put it in an Islamic bank that is known to handle transactions in the manner prescribed by Islamic teaching, and does not engage in prohibited transactions such as riba and the like.
There are consultancies which specialize in identifying projects and conduct feasibility studies, and [after investment in a project] they supervise projects for several months, in return for a fee that is agreed upon. You can seek the help of such consultancies.
Because there are now so many dishonest people who do not refrain from consuming people’s wealth unlawfully, the owner of the wealth must take extra care and ascertain the honesty of the person to whom he gives his wealth.
It would be a good idea for governments to play this role [which is to facilitate the investment of people’s wealth], because they are more able to do that than individuals. Instead of taking people’s wealth in riba-based loans that charge a fixed rate of interest every month, there could be real, beneficial projects and the contract could be one of mudaarabah (profit sharing), regulated by shar‘i guidelines.
But as governments have not done that, and as there is little trust among people, the one who has wealth and does not know how to do business is vulnerable to every thief and cheater, so wealth is lost and along with it many interests are not served.
We ask Allah to rectify the affairs of the Muslims.
And Allah knows best.