Well...that depends on you and what it'* worth to you.
If a motor goes on my Regal (which I paid $1400 for a year ago) I'd toss $250 into a JY motor, then drop it in within a day. To me that'* worthwhile. I'll be putting a transmission in soon. It cost me $200 to rebuild it.
If you think the car is worth $500 and the motor runs you $300.. well, it'* all in how you feel about the car.
X2 on putting a $300 junkyard motor if you like the car but know it has a limited lifespan due to rust.
Then while it is still running you have time to make an informed decision about what you will replace it with.