So are you looking to achieve this entirely within your iPad, i.e. stream audio from one app which sends its audio output directly to another app running in the background, or are you streaming from a different device that you want to plug into the iPad and use the iPad as just a glorified taperecorder?
If the former, there are Loopback apps for Macs which allow you to record audio from one app (let's say Spotify) into another app (let's say GarageBand or Memos), but I'm not sure if such an app exists on the iPad. But that said, I haven't looked.
If you just want to use the iPad as a glorified taperecorder to record audio from a different device, you need an audio interface that plugs into your iPad. If you have a USBC iPad then boy are are you in luck because there are dozens of audio interfaces that will just plug right in and work if you use a USBC-to-whatever cable. If you are on a Lightning iPad, it's still possible but way more complicated.