Pipeline does not correctly set `.feature_names_in_` attribute on classifier

### Describe the bug

`Pipeline` appears not to set/propagate the `.feature_names_in_` attribute between steps in the Pipeline beyond the first step.

### Steps/Code to Reproduce

```python
from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
import pandas as pd

X, y = load_iris(return_X_y=True)
x = pd.DataFrame(X, columns=["A", "B", "C", "D"])


pipe1 = Pipeline(
    [
        ("classifier", LogisticRegression(random_state=0, max_iter=300)),
    ]
)

pipe2 = Pipeline(
    [
        ('scaler', StandardScaler()),
        ("classifier", LogisticRegression(random_state=0, max_iter=300)),
    ]
)

model1 = pipe1.fit(x, y)
model2 = pipe2.fit(x, y)

c1 = model1.named_steps["classifier"]
c2 = model2.named_steps["classifier"]

c1.feature_names_in_

c2.feature_names_in_
```

### Expected Results

The `.feature_names_in_` attribute should be set for both `c1` and `c2`, returning: `array(['A', 'B', 'C', 'D'], dtype=object)`

### Actual Results

The `.feature_names_in_` attribute is set for `c1`, corresponding to a single step `Pipeline`, but not for `c2`. 

```
>>> c2.feature_names_in_
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'LogisticRegression' object has no attribute 'feature_names_in_'
```

Note that `model2.named_steps["scaler"].feature_names_in_` is set correctly however. So it looks like `Pipeline` is not propagating the feature names across steps correctly.

### Versions

```shell
>>> import sklearn; sklearn.show_versions()

System:
    python: 3.10.4 (main, Apr 26 2022, 19:43:24) [Clang 13.0.0 (clang-1300.0.29.30)]
executable: /Users/xxx/Projects/ecba-version-2/.venv/bin/python
   machine: macOS-11.6.6-x86_64-i386-64bit

Python dependencies:
      sklearn: 1.1.1
          pip: 22.0.3
   setuptools: 60.6.0
        numpy: 1.22.4
        scipy: 1.8.1
       Cython: None
       pandas: 1.4.2
   matplotlib: 3.5.2
       joblib: 1.1.0
threadpoolctl: 3.1.0

Built with OpenMP: True

threadpoolctl info:
       user_api: openmp
   internal_api: openmp
         prefix: libomp
       filepath: /Users/xxx/Projects/ecba-version-2/.venv/lib/python3.10/site-packages/sklearn/.dylibs/libomp.dylib
        version: None
    num_threads: 12

       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: /Users/xxx/Projects/ecba-version-2/.venv/lib/python3.10/site-packages/numpy/.dylibs/libopenblas64_.0.dylib
        version: 0.3.18
threading_layer: pthreads
   architecture: Haswell
    num_threads: 6

       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: /Users/xxx/Projects/ecba-version-2/.venv/lib/python3.10/site-packages/scipy/.dylibs/libopenblas.0.dylib
        version: 0.3.17
threading_layer: pthreads
   architecture: Haswell
    num_threads: 6
```
```

COMMENT:
Try to remove 'scaler', StandardScaler()) in pipe2 and run the code.It should work.

Labels: Bug, Needs Triage