Even saving can be seen as greed. Someone can focus too much on accumulating for themselves. Both investing and saving can be seen as preparation.
To avoid things becoming evil, you just need to make sure that your interactions with other are cooperative and not zero sum, and not all investments are zero sum.