If you want to use the pooling kernel on the feature dimension of the output of the linear layer, you could unsqueeze a channel dimension, apply the pooling, and squeeze the channel dimension again.
Note that the kernel would pool neighboring features. The output activation of linear layers would not contain spatially correlated features, so I would recommend to also test other strategies such as keeping the largest outputs or calculate some form or correlation factor.
Let us know how your experiments went!