Any attempted message will get charged. However, if the number is “forever” unreachable (i.e. unsubscribed, can't receive SMS), you’ll only be charged for the first attempted message. After that, you won’t be. (Usually, the message box is grayed out for those numbers).
Did this answer your question?