Bankruptcy prediction is the process of measuring the possibility of a company facing bankruptcy or financial distress in the future. An accurate bankruptcy prediction model is valuable for creditors, investors, and financial institutions to assess credit risk, make informed investment decisions, and take appropriate risk management measures. Various methods have been built to contemplate bankruptcy, involving more advanced machine learning (ML) methods and traditional statistical techniques. Typically, this method utilizes financial ratios, accounting data, market performance indicators, and other related variables as input features for predicting the probability of bankruptcy. There has been a growing interest in leveraging the power of neural networks for anticipating the bankruptcy with the emergence of deep learning (DL) methods. With this motivation, this article introduces a new white shark optimizer with deep learning-based bankruptcy prediction for financial risk assessment (WSODL-BPFCA) technique. The presented WSODL-BPFCA technique utilizes a hyperparameter-tuned DL model to predict the existence of bankruptcy. To obtain this, the WSODL-BPFCA technique utilizes min-max normalization to transform the input data into a uniform format. For bankruptcy prediction, the WSODL-BPFCA technique introduces an attention-based long short-term memory (ALSTM) approach. Lastly, the hyperparameter tuning of the ALSTM model was carried out by employing of WSO approach. To exhibit the enhanced performance of the WSODL-BPFCA technique, a widespread set of simulations were performed. The comprehensive comparison study highlighted the improved results of the WSODL-BPFCA technique as 97.61% in terms of different metrics.