Spectrally adapted physics-informed neural networks for solving unbounded domain problems