text: Title: Bug: Remove use of `assert` for pydantic import flow control
  Body: ### Description
  
  It was a poor choice to use assertions for the Pydantic import version discrimination refactor in #3347, as they can be optimized away.
  
  We should revert to raising some other exception type where this was applied.
  
  https://github.com/litestar-org/litestar/blob/fe73848ad25961f37109ad4049799a64b856c8d3/litestar/contrib/pydantic/pydantic_dto_factory.py#L26-L37
  
  ### URL to code causing the issue
  
  _No response_
  
  ### MCVE
  
  ```python
  # Your MCVE code here
  ```
  
  
  ### Steps to reproduce
  
  ```bash
  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error
  ```
  
  
  ### Screenshots
  
  ```bash
  "![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"
  ```
  
  
  ### Logs
  
  _No response_
  
  ### Litestar Version
  
  v2.8.2
  
  ### Platform
  
  - [ ] Linux
  - [ ] Mac
  - [ ] Windows
  - [ ] Other (Please specify in the description above)