Investing during a recession can offer a great opportunity to build wealth under certain circumstances. But it may not be the right move for everyone.