The behaviors you describe sound really typical of a teenager, particularly one who was already struggling with self-esteem issues. I think all teenagers go through a period of time when they try and categorize things as GOOD or BAD, with no shades of gray in between. It takes some time and additional growth before they can begin to understand that things can be positive even if they also have negative elements to them.
Imagine someone who thinks this way, and then notices both positive and negative elements within themselves. That person is either going to discount the positive elements and call themselves all bad, or discount the negative, and call themselves all good. If she is already fighting against feeling badly about herself, she may well tend to overcompensate in the other direction, by trying to convince everyone around her (and thereby convince herself) that everything about her is perfect.
The behaviors you mention in your comments are even more typically teenage-when I was 15, my sister could have been dying of the plague, and that still wouldn't have been important enough for me to interrupt my telephone conversation about whether that cute guy was going to ask me to the dance.
As for how to deal with this behavior, I think you are on the right track when you mention setting boundaries. When she says things that are inappropriate, mean or racist, call her on it and tell her that you won't allow her to speak that way around you. She will very probably stomp off and refuse to talk with you in the moment, but if you continue to be there for her, she will come back to you again.
If her brother is ill, and you have to focus on him instead of her, she will be peeved at you, and you just have to explain that there are times when other people need you more, and that you would do the same for her in similar circumstances.
With kids in general, but I think especially with teenagers, it is vitally important to set consistent limits that they can rely on. They will then use that consistency as a baseline and will experiment to see how far those boundaries can stretch. If you let them get away with moving past a boundary in a particular situation, you need to have a good reason that you can articulate to them for allowing that boundary to be breached; otherwise they really do need consistency so that they have something to test against.
Also, in my experience the best way to teach appropriate behaviors in my kids as teens was to model it consistently, and to call them on it only when it was particularly egregious.
Just a couple of months ago, I had a major argument with my older son (who is 21), because I suggested he adjust some plans that he had made to take a situation his brother was dealing with into account. He became very angry, accusing me of always coddling his brother, and always asking him to make adjustments. I pointed out specific instances where I had done just the opposite, but that just made him angrier. We finally ended with my agreeing that he did not have to make the adjustments I was suggesting, but that he should think about how this type of flexibility could allow him to build better relationships in the future.
He left the room, clearly still angry. About ten minutes later, he came back out of his room, and thanked me for trying to help he and his brother to be better people.
I view this as a major triumph-he still didn't act in the way I wanted him to, but at least he was willing to acknowledge that there might be some good reason for my wanting him to behave in a certain way. But, please notice that he is two years past being officially a teenager, and is only now beginning to be able to see and acknowledge my good intentions, rather than just opposing them.