BUG: repr aligning left for string dtype columns
- [ ] closes #54797 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

cc @jorisvandenbossche this is a bit hacky, but changing format_array breaks index-related stuff. Don't feel comfortable to do this now, can be a follow up (we are casting to object anyway, so this does not impact performance)
> this is a bit hacky, but changing format_array breaks index-related stuff.

Looking at the code in `Index._format_with_header`, it seems we just never use `format_array` in case of object dtype (i.e. current strings). And in the code path for non-object dtype calling `format_array`, we specify `justify="left"`. That's the reason for this behaviour, and so something we would have to change (or let the value depend on the dtype; I don't fully understand the reasoning for this `justify="left"` for other dtypes) Yeah that's correct, we can set justify=all, but this screws with Index formatting if the index has a NaN because we are doing something weird. But that's too big for this here, that's why I went with the short term solution > I don't fully understand the reasoning for this `justify="left"` for other dtypes

You can get this "bug" as well for other data types because of this left alignment. For example with numeric index:

```
In [14]: df = pd.DataFrame({99999999999999999: [1, 2, 3], 1: [4, 5, 6]})

In [15]: df
   99999999999999999  1                
0                  1                  4
1                  2                  5
2                  3                  6
```

(will move this to the issue)

