It shouldn't bother society/people what we wear in the privacy of our home. If it's customary to wear undershirts outside and your daughter doesn't, people will probably give her their opinions of her. If she's willing to put up with listening to people criticize her (in order for her to feel comfortable), she may continue to not wear undershirts. But at least you (and her grandmother) have taught her. Now she's old enough to make her own decisions and deal with the outcomes of those decisions.
Is there any other reason, besides tradition and customs, that a woman should wear an undershirt? If there is, maybe you and her grandma can tell her those reasons (rather than using words like "shameless").
If she's in danger of being harassed by men if she doesn't wear an undershirt, she may feel that she doesn't deserve to be treated any better by men because her father left her. In cases like that, all you can do is let her know that her father didn't leave her because there was something wrong with her, he left her because there was something wrong with him. Unfortunately, sometimes words aren't enough and those women end up in abusive relationships - which is very painful for people (such as yourself) who care.