How to pass enum in function?

First problem is that a UFunction is a property you have to get from the UClass.
Second problem is that that problem is irrelevant because you’re assigning the wrong thing to the spawner. Right now you’re trying to assign an instance to TSubclassOf which wants a class. So you'd assign it UK2Node_CallFunction::StaticClass().

You probably shouldn’t even bother with the spawner beyond looking at the implementation of UBlueprintNodeSpawner::SpawnEdGraphNode. I don’t see any reason you couldn’t do all of that on your own, directly. Just omit the things you don’t need like the PostSpawnDelegate (since you’ll know the type and how you want it configured).