Depends on where you are, and the legalities are largely not tried in courts.
In the USA, it is legal to record anything you want for personal use from a radio broadcast. This would include digital radio.
Where it becomes unclear is when you record a stream from a station that also broadcasts, or when you record a stream from a station which is internet only. Generally these are thought to be covered by the personal use broadcast exception, but I am not sure that this will EVER be tested.
Because as long as it is for personal use, and you don't pass it on or post it on the net or make and sell mix CDs at a flea market, then there is really no reason to come after you.
Now, as has been observed, if you agreed to limitations when you signed on to Spotify, then you might be breaking their contract and you might be in trouble with them. But again, as long as you never, ever pass any of that on, I doubt they are going to come looking to lock you up!
-Ben