Yes it’s legal, if you contact the Family Rights group they explain it all.
https://frg.org.uk/
You need some sort of legal framework to support you and the child.
However , as it’s your husband family and he is the one who wants to do it, I think needs to take leave from work , not you. You are already taking leave to care for your own child.
You suspect will have trouble getting SS to provide support / assessment if you only have him on a temporary basis.
I also think you need a long term plan, as it’s highly likely that his parents won’t visit him, they will lose touch and never take him back.
Will you keep him forever or ask SS to place him for adoption ? Id guess that you will be under a lot of family pressure to keep him. Because if he’s going to be placed for adoption, it’s better to do it now than in 9 months time, when he’s traumatised by yet another move.
Can you afford to permanently raise 4 children, one with potential SN? is your husband in a position to give up his job ( or at least go part time ) to raise his nephew?
Is your house big enough? Many traumatised children need their own bedrooms and can’t share.
What will be the effect on your own children of having a traumatised child , especially one with SN? Are you happy for all your family life for the next 20 years to potentially be focussed on your nephew ? Eg holidays, hobbies
How will you ensure that your younger child is safe? Social services usually insist that the fostered child is the youngest by at least 2 years.
I have to say that I’m bemused as to why your inlaws are not supporting their son to keep his child . That’s by far the best thing for the child - to stay with one of his parents. Social services will help him to get housing - as a homeless parent of a young child he would have high priority.
Many single mums end up having to stay with relatives in a one bed house (in an emergency ) and very few of them don’t want to keep their children with them. That makes he think that he doesn’t want his child either ☹️
It’s a very sad state of affairs. I can understand why his family are flailing around looking for any possible short term option, perhaps to avoid having to face the inevitable. but it needs to be about the child’s best interests, not the grandparents’ feelings.