A man charged with starting a house fire that led to police rescuing four people from the blaze allegedly remarked afterwards that he was in “a lot of trouble”, a court has heard.