yes, they will still in ur team for 7 days (after the day u get him) even u get him 1 day before season ends,
just try sell some and sign that player before 7 days

but my suggestion dont buy players at the end of season, bcoz next season they ll loose 1 star,
buy player in the new start of season and u can get 5 stars player with 1 point more become 6 stars player..