Skin diseases are one of the most widespread global health issues, impacting millions of people worldwide. Being the most sensitive part of the body, it requires accurate and quick pre-diagnosis to prevent severe outcomes. The traditional diagnostic methods used by dermatologists are often proven insufficient, which motivated researchers to focus on developing deep learning (DL) systems that can provide early diagnosis and treatment for patients. However, current DL systems face challenges with limited, low-quality, and imbalanced datasets, leading to overfitting and limited generalization. Our proposed method leverages transfer learning with pre-trained models and is tested on DenseNet121, DenseNet201, VGG16, VGG19, and ResNet152, respectively, with modified top layers for skin lesion classification. These models use pre-trained weights from ImageNet as primary values and fine-tune when training on the skin lesions dataset. We use the most challenging ISIC 2019 public dataset, which is popular for its complexity in skin lesion classification. To improve image quality and facilitate more accurate feature extraction, we applied a hair removal algorithm to reduce visual obstacles in dermoscopic images. We evaluated the impact of class weights and data augmentation techniques, including shifting, rotation, zoom, and shear, to improve model generalization. We provide Grad-CAM visualization for model interpretability and qualitative evaluation. Experimental results show that the DenseNet201 achieved the highest accuracy of 96%, demonstrating its effectiveness in our proposed hair removal and class imbalance solutions for skin lesion classification tasks.