Analysis and geometry of RCD spaces via the Schrödinger problem