You are fundamentally talking about investing on margin - borrowing money to invest. This is the same as taking out a HELOC on your house to invest, or taking a cash advance off of a 0% credit card to invest. Except, of course, student loans can't be discharged in bankruptcy.
This is an aggressive investment strategy - while "they" are currently projecting around 7% market returns, no one is promising that that will happen next year, or the year after. Yes, the market goes up over time, frequently significantly -- but that is measured over decades. Look at any chart of year-by-year returns and see just how often the market is below your 7% projection. So how aggressive of an investor are you? How comfortable are you with losses? If you take out a $20K loan and the market drops 30%, how are you going to react?
You have enough savings in reserve that even a major crash wouldn't wipe you out -- as long as you don't bail and sell, and as long as you get a job that allows you to pay off those loans out of cashflow. So, sure, you can. But that doesn't mean you should.