Janet Yellen, President-elect Joe Biden’s nominee for treasury secretary, has earned more than $7 million in speaking fees from banks and large companies since leaving the Federal Reserve in 2018, a record that will force Yellen to seek permission before working at Treasury with some of Wall Street’s largest financial institutions.