Capitalism is not well-defined in economics. In most economic textbooks the word capitalism is not even printed.
However, according to dictionary (Merriam-Webster) definition:
an economic system characterized by private or corporate ownership of capital goods, by investments that are determined by private decision, and by prices, production, and the distribution of goods that are determined mainly by competition in a free market [emphasis added]
The above definition does not seem to exclude the kind of macroeconomic management intervention prescribed by Keynes theory and its newer interpretations. Moreover, I know that political science happens to distinguish between different capitalism such as state capitalism or market capitalism but this is not done in economic theory where the word is scantly used.
Socialism is bit better defined in economics (but it is still term that is not commonly used and avoided as its too value laden and scientists try to avoid value laden terms as much as possible), and it is defined as an economy where means of production are predominantly owned/controlled collectively by the state (see this article on investopedia). Nothing in either original or New Keynesian theory calls for state/collective ownership at all, let alone making that the predominant mode of production, so I dont see any way how the sort of policy prescriptions made by Keynes could be considered 'socialistic' per se in economic meaning of the word.
Furthermore, neither neoclassical or Keynesian theory pertain to any particular economic system in principle. Both schools focus mainly on describing mixed predominantly market economies because those happen to be the kind of economies that are most common in the real world. However, some parts of both neoclassical theory and Keynesian theory would be applicable to centrally planed 'socialistic' economies as well. For example, as @BrianRomanchuk correctly points in his comment the Keynesian aggregate demand management policies are avaiable to any government no matter what economic form of organization/ideology it follows.