Either someone else or Hagoromo will explain what she was trying to do or Kaguya spit Madara to bring her back and then the bullshit will resume where it left off.
Let's pray to Jashin that Hagoromo explains it (since it happened in the past) rather than Kaguya returning.