After years of pouring money into private credit, high-profile defaults and AI jitters have investors running for the exits.