Seeking to accommodate more students and shifting academic needs, Stanford University is preparing to add nearly 2 million square feet of academic space, 2,500 student beds and about 500 units of housing for faculty and staff over the next two decades, according to a permit application that the university submitted to the county Wednesday.