Private credit has grown rapidly as a source of funding for firms and households after big banks retreated from riskier lending following the 2008 financial crisis.